Reputation: 670
I use a .jsx script to open an Illustrator file, modify it, then save and close it. The script is called from another program. After the script execution, I need to quit both Illustrator and ExtendScript Toolkit softwares. I tried the following code:
[...]
document.close();
app.quit(); // quitting Ai
Illustrator exits well after the script execution but ExtendScript Toolkit application is still opened, even if the script is terminated.
I call my script from a Windows command:
"C:\Program Files\Adobe\Adobe Illustrator CS6 (64 Bit)\Support Files\Contents\Windows\Illustrator.exe" "C:\Users\user\Documents\Adobe Scripts\script.jsx"
So, does anyone know how to quit the ExtendScript Toolkit window from the script (or anywhere else).
Once the script is terminated, I could see in the data explorer window, I see an app object named 'ExtendScript Toolkit' with a .quit() function, but I can't call it from the script because while executing 'app' is still Illustrator.
Upvotes: 4
Views: 2311
Reputation: 111
Good question. I'm not sure what the #target is for ESTK. I've tried ESTK, extendscript, so not sure. If ExtendScript has an alias, I'm certain that once you target it you can quit without issue.
Alright so this is how to do it.
#target illustrator
//do stuff
app.quit()
#target estoolkit
//do stuff
app.quit()
Upvotes: 4