• 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: launch broken in Mt Lion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: launch broken in Mt Lion


  • Subject: Re: launch broken in Mt Lion
  • From: Luther Fuller <email@hidden>
  • Date: Mon, 18 Mar 2013 08:51:48 -0500

This usage seems odd ...

I don't know when it changed, but if I simply use "run" in my scripts I get the behavior I formerly expected with "launch"
For example:

tell application "Safari" to run
or
tell application "Mail" to run

No window and doesn't come to front.

AppleScript's 'launch' command is used to gain access to a handler within an AppleScripted application.
Like this ...

launch application hostAppl
tell application hostAppl to doSomethingElse() 

The first line "opens" the application without doing anything else (no 'run' is sent).
The second line invokes the desired handler.

If the first line sends a 'run' to hostAppl then the next line results in a -609 error.

The 'launch' command, as far as I know, only applies to AppleScripted applications that have handlers other than a 'run' handler. This is explained in:

ASLG (2008-03-11), page 164: launch

Launches an application, if it is not already running, but does not send it a run command.

It works this way in Lion, but is broken in Mountain Lion.


 _______________________________________________
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: 
 >Re: launch broken in Mt Lion (From: Luther Fuller <email@hidden>)
 >Re: launch broken in Mt Lion (From: Lists <email@hidden>)

  • Prev by Date: Re: launch broken in Mt Lion
  • Next by Date: Filemaker Advanced vs Pro
  • Previous by thread: Re: launch broken in Mt Lion
  • Next by thread: Filemaker Advanced vs Pro
  • Index(es):
    • Date
    • Thread