Re: A bug (was Re: make new folder)
Re: A bug (was Re: make new folder)
- Subject: Re: A bug (was Re: make new folder)
- From: Luther Fuller <email@hidden>
- Date: Mon, 2 Jun 2008 20:02:44 -0500
An update. Earlier, I got everything working correctly in Leopard, but
not in Tiger, and I just couldn't leave it alone.
Finally, after tediously transferring files to my iBook umpteen times
and looking at error messages without end, I caught on to the real
problem and tried something new. Now it works in Tiger and Leopard.
Yes, there is a problem passing variables from Finder to System
Events, but it's easy to avoid. Aliases created in Finder seem to
error when used in System Events. So do something like this ...
tell application "Finder"
-- do bunches of stuff
set aliasToAnItem to ( ... ) as alias
-- do more bunches of stuff
end tell
set aliasToAnItem to (aliasToAnItem as text) as alias
-- this line must NOT be inside the tell blocks above and below
tell application "System Events"
set (visible of aliasToAnItem) to false
end tell
Once I modified my script to remove violations of this rule ... it
worked.
On Jun 2, 2008, at 12:00 PM, Paul Berkowitz wrote:
On 6/2/08 9:44 AM, "Luther Fuller" <email@hidden> wrote:
And, yes, there seems to be a problem with Finder and
System Events not being able to share variables.
If the variable represents an object (file, folder, etc.) that would
make
sense. But have you tried first coercing 'as alias' before setting the
variable to it? If you can do that, I think you ought to be able to
share
the variable.
_______________________________________________
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