Re: Yosemite and activate failures
Re: Yosemite and activate failures
- Subject: Re: Yosemite and activate failures
- From: Shane Stanley <email@hidden>
- Date: Fri, 16 Jan 2015 10:44:46 +1100
- Sun-java-system-smtp-warning: Lines longer than SMTP allows found and truncated.
On 16 Jan 2015, at 5:33 am, Ray Robertson <email@hidden> wrote:
>
> I’d appreciate anyone else verifying the same results in script applications under Yosemite.
Yes, I see the same thing. It looks like the activate command is being executed asynchronously, so the script has moved on by the time it happens.
I tried rewriting it in ASObjC using the equivalent (activateWithOptions:NSApplicationActivateIgnoringOtherApps), and the result is the same. I'm not sure whether that means the problem is a change in the underlying behavior, or if there's been a change in the activate command itself -- I suspect the former. Apple has never been a fan of anything other than the user activating apps.
You can add a delay -- which I suspect is what using the say command is doing for others -- but that's always a bit icky. If System Events is doing more than a delay, and actually waiting until the new app is active before returning, that seems a much more reliable option to me. But I'd like to see some evidence of such foresight. And you have to deal with the issue of process name not always matching application name.
--
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