Re: OSAScriptController's stopScript action
Re: OSAScriptController's stopScript action
- Subject: Re: OSAScriptController's stopScript action
- From: Shane Stanley <email@hidden>
- Date: Thu, 18 Dec 2014 10:52:44 +1100
On 17 Dec 2014, at 4:24 pm, Brian Christmas <email@hidden> wrote:
>
> No way to stop ASObjC apps unless you monitor the keyboard.
That's not quite the full story, assuming you mean an ASObjC-based app built in Xcode. There's no command that will make one quit, but command-. will still generate a user cancelled error. It just has to happen while AS code is actually running, and with an ASObjC-based app that's not all the time.
Build and run an app containing this:
on applicationDidFinishLaunching_(aNotification)
do shell script "sleep 10"
display dialog "Done"
end applicationDidFinishLaunching_
Launch it, then hit command-.. You'll never see the dialog, and the error will appear in Console.
This can be a real trap if you decide to set command-. as a short-cut to some command in your app.
The delay bug also happens in ASObjC-based apps.
--
Shane Stanley <email@hidden>
<www.macosxautomation.com/applescript/apps/>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden