Re: launch broken in Mt Lion
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