TooTallNate / node-applescript

A Node.js module to easily execute arbitrary AppleScript code on Mac OS X.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Stop Execution of Apple Script

vikas-chhabra opened this issue · comments

commented

I have one use case in which the apple script can take custom time to execute. Let's say the apple script takes 1000 seconds to execute.
If the apple script is currently in execution then how I can interrupt the execution of the apple script or stop it?

I am currently starting the execution of an apple script like this.

applescript.execString(script, (err, rtn) => { if (err) { // execution runs well no error console.log("Something went wrong ", err); // Something went wrong! } console.log(rtn); // not returning anything });