Re: Yosemite and activate failures
Re: Yosemite and activate failures
- Subject: Re: Yosemite and activate failures
- From: Axel Luttgens <email@hidden>
- Date: Wed, 22 Apr 2015 16:50:13 +0200
- Sun-java-system-smtp-warning: Lines longer than SMTP allows found and truncated.
> Le 22 avr. 2015 à 15:12, Ray Robertson a écrit :
>
> I initially thought this issue was fixed in 10.10.2. However, in 10.10.3 I’m now seeing that while activate directed at another application works as expected, using “tell me” to activate the script app itself does not.
>
> So with this run as an application…
>
> tell application id "com.apple.TextEdit" -- TextEdit
> activate
> display dialog "TextEdit should be frontmost"
> end tell
> tell me to activate
> display dialog "The script app should be frontmost”
>
> …I correctly see the first dialog in TextEdit, but I get the bouncing dock icon for the second one.
>
> The above works as expected in 10.9.5.
Quickly tried this one:
tell application "TextEdit"
my activateAndWait(it)
display dialog (get name)
end tell
tell application "Mail"
my activateAndWait(it)
display dialog (get name)
end tell
tell me
my activateAndWait(it)
display dialog (get name)
end tell
on activateAndWait(tgt)
tell tgt
activate
repeat while not frontmost
delay 0.05
end repeat
end tell
end activateAndWait
Works as expected in SE, no bouncing dock icon when saved as an applet, since its icon has to be clicked in the dock for the execution to continue.
On the other hand, copying the applet’s Contents/Resources/Scripts/main.scpt file to a pre-Yosemite applet and running the resulting applet works like a charm.
Axel
_______________________________________________
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