mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-28 09:21:55 +01:00
A script's documents[0] was the first tab, not the active document, so scripts that read app.documents[0] as the document in front acted on another one. The scripting guide says documents[0] is always the active document: https://ai-scripting.docsforadobe.dev/scriptingJavascript/objectReferences/ Each open document now records when it last became the current one. documents lists the current document first and then the others from the one current most recently to the one current longest ago (VectorCraft's own rule). documents["name"] and getByName search in the same order. A change a script makes to a document in the back switches to it and back, and that switch no longer moves the document in the list. Three tests that read documents[0] as the first tab with two documents open now read documents[1].