• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag
 

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: OSAScriptController's stopScript action
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >OSAScriptController's stopScript action (From: sqwarqDev <email@hidden>)
 >Re: OSAScriptController's stopScript action (From: Brian Christmas <email@hidden>)

  • Prev by Date: Re: Javascript for automation quastions
  • Next by Date: JSA -- now I believe this is a bug (JSA or AS)
  • Previous by thread: Re: OSAScriptController's stopScript action
  • Next by thread: Re: OSAScriptController's stopScript action
  • Index(es):
    • Date
    • Thread