Le 15/01/2015 à 22:15, Ray Robertson < email@hidden> a écrit :
On Jan 15, 2015, at 3:06 PM, Yvan KOENIG < email@hidden> wrote: What I described as the correct result is in fact : <snip>
So, It's not the normal one.
Thanks for testing. I should add: I’m often getting different results when running the original script with the “activate” command. I’ve yet to see a pattern behind the behavior. I just know in almost all cases the result is wrong.
My understanding is that as it has so graphical interface, the script's process is not seen as the frontmost one.
I have not heard that anything app without a GUI would not be seen as frontmost. Regardless, it seems as if System Events is able to ensure an application is frontmost. But under Yosemite we can no longer rely upon “activate” in applets. Anyone using GUI scripting in an applet should take note, though this will also affect some scripts using pure AppleScript as well.
Ray
When I use GUI Scripting, it's to drive applications with a Graphical User Interface and I never got problem since the delivery of Yosemite.
My message was written to highlight the fact that AppleScript see correctly the applet as the current application but that System Events doesn't see it as the frontmost process. As I am not a professional, I don't know if it's a "normal" behavior. I'm just not really surprised to see that a process with no interface is not the frontmost one.
Yvan KOENIG (VALLAURIS, France) jeudi 15 janvier 2015 22:36:19
|