Copy link to clipboard
Copied
I'm using the next code:
function onLoaded() {
var csInterface = new CSInterface();
csInterface.addEventListener("documentAfterActivate", onDocActivatedChanged);
}
function onDocActivatedChanged(event) {
new CSInterface().evalScript("$il._ext.callFunction()");
}
I have two questions:
- What other events can I use in illustrator?
- How can I use the event return var in the function onDocActivatedChanged?
Best Regards,
vgcouso
If I understand correctly, there is a “documentAfterSave” event, which was fired right after the document was saved. However, Iillustrator does not support this event.
There is no document about this now, and we plan to add a part into cookbook later. “documentAfterActivate”, “documentAfterDeactivate” and “applicationActivate” are the three events supported by Illustrator now. An event may have “type”, “EventScope”, “appId”, “extensionId” and “data” properties, it depends on how the products lik
...Copy link to clipboard
Copied
On the Illustrator Scripting Forums:
http://forums.adobe.com/message/5920542#5920542
does this help at all?
Copy link to clipboard
Copied
Please see my answers inline:
- What other events can I use in illustrator?
There are two other events sent by AI: documentAfterActivate and documentAfterDeactivate. The documentAfterActivate event fires when a document has been activated (after new/open document; or after document has retrieved focus). The documentAfterDeactivate event fired when the active document has been de-activated.
- How can I use the event return var in the function onDocActivatedChanged?
AI set two parameters in the event call back return value: event.type is “applicationActivate” and event.appId is “ILST”.
Hope it helps!
Copy link to clipboard
Copied
Exist some event for when save and other?
Where is documented event var?
Copy link to clipboard
Copied
If I understand correctly, there is a “documentAfterSave” event, which was fired right after the document was saved. However, Iillustrator does not support this event.
There is no document about this now, and we plan to add a part into cookbook later. “documentAfterActivate”, “documentAfterDeactivate” and “applicationActivate” are the three events supported by Illustrator now. An event may have “type”, “EventScope”, “appId”, “extensionId” and “data” properties, it depends on how the products like Illustrator assign the value.
Copy link to clipboard
Copied
Hi,
is the event parameter returns any document info?
for ex, in "documentAterDeactivate" event returns closed document info in illustrator?
Find more inspiration, events, and resources on the new Adobe Community
Explore Now