Re: A Yummy (_Not_) Bug: Gremlin is Rewriting my GUI-Scripting
Re: A Yummy (_Not_) Bug: Gremlin is Rewriting my GUI-Scripting
- Subject: Re: A Yummy (_Not_) Bug: Gremlin is Rewriting my GUI-Scripting
- From: Matt Neuburg <email@hidden>
- Date: Mon, 29 Aug 2005 12:48:41 -0700
On Sun, 28 Aug 2005 12:23:12 -0400, Jonathan Levi MD <email@hidden>
said:
> tell application "System Events"
> repeat until ((exists process "MPW Shell") and ¬
> (frontmost of process "MPW Shell" is true))
> tell application "Script Editor"
> repeat until ((exists «class prcs» "MPW Shell") and ¬
> (frontmost of «class prcs» "MPW Shell" is true))
There is no rewriting here. Well, there's one little bit of rewriting, but
it has an unfortunate big-looking effect. All that's happening is that the
target "System Events" is being replaced by the target "Script Editor".
Since Script Editor's dictionary does not define the terminology you're
using, you see it as raw code. This is thoroughly explained in my book; it's
just a feature of AppleScript.
So we only have to account for one thing: how did the target get changed
from "System Events" to "Script Editor"? The answer is: I don't know! In
order to make a guess, I'd have to know more about the history of this
compiled script file. I have seen this happen when a file is moved from one
machine to another (and I comment about this in my book). When it happens,
it's very annoying, since unless you happen to be the author of the script,
you may not be able to guess who the correct target is supposed to be. This
is one reason why, in my view, it is actually better to move a script from
machine to machine as text than as a compiled script file.
So what did happen to this file? Is this all happening on the same machine?
If so, I can't account for it. If you're not running the file from within
Script Editor normally, how is it being run? More info is needed.
m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide
<http://www.amazon.com/exec/obidos/ASIN/0596005571/somethingsbymatt>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden