Copy link to clipboard
Copied
Run a script from command line:
"c:\program files\full path to your illustrator version\illustrator.exe" "c:\full path to your script\script.jsx"
I have found that the command will not block and the task continued, so is there any way to block the script before the task ends?
Copy link to clipboard
Copied
Hello, I don't understand your question. Can you please describe it more precisely?
If you only want the javascript to wait for a fixed time, then this can help you:
$.sleep(1000); // tell extendscript to sleep 1000 milliseconds
// your code will be executed after 1 second
alert("hello one");
// setTimeout of normal Javascript, but not part of extendscript
$.setTimeout = function(func, time) {
$.sleep(time);
func();
};
$.setTimeout(function () {alert("hello world")}, 1000);
Copy link to clipboard
Copied
In order to block, an Illustrator script must be sent from ESTK which forces a targetengine, or to find a way to force a targetengine because when running as normal, Illustrator runs scripts inside the targetengine which is an empty string.
You can check by $.engineName == "";
However, you can send your script through with BridgeTalk which is how you can force an targetengine.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now