Le 2015/09/28 à 11:43, Brian Christmas < email@hidden> a écrit :
Thanks for the feedback. Given the size of used characters I guess that it's set frontmost to true which did the trick. On my side, I no longer try to check if it's useful or don't, I insert the instruction after the tell process opening code triggering GUI Scripting.
With it I'm quite sure that you may drop two of your delay instructions.
I no longer use this kind of delays which must be set to a large value to be OK on every machine. I use loops checking that the item to trigger is available. In my first attempts, I entered quite often in infinite loops so now I use something like : repeat with i from 1 to 20 If i is set to 20 when the loop is exited it's safe to assume that the preceding code didn't do its job and I issue a descriptive error message.
With your code in which it seems that a lot of UI items aren't predefined it may be a bit boring.
Yvan KOENIG running Yosemite 10.10.5 in French (VALLAURIS, France) lundi 28 septembre 2015 12:31:51
|