Re: How to get Finder and System Events confused
Re: How to get Finder and System Events confused
- Subject: Re: How to get Finder and System Events confused
- From: Christopher Nebel <email@hidden>
- Date: Wed, 19 Mar 2003 12:57:10 -0800
On Wednesday, March 19, 2003, at 05:34 AM, Charles Arthur wrote:
At 6:52 pm -0800 18/3/03, Olof Hellman wrote:
But this fails:
tell application "Finder"
container of file of process 1
end tell
--> Finder got an error: NSCannotCreateScriptCommandError
Yes. As Olof guessed, the problem is that System Events doesn't
support the "container" property, nor is it smart enough to ask the
Finder. I've filed an enhancement request; in the meantime, adding an
explicit "get" will work around the problem, as JD and Emmanuel pointed
out.
I do find it interesting that when some scripters (self included)
first discovered that one could script System Events directly - back
in the 10.1.0 days, I think - and reported so back here, Chris N said
that doing so was deprecated because S.E. could change and wouldn't
necessarily be exposed. Now it seems, through UI Scripting, that SE is
being exposed rather a lot.
I did say that at the time, but I've since retracted that. For a
variety of reasons, System Events is fully public now, and you can
refer to it with impunity, assuming you're willing to sacrifice
backward compatibility with Mac OS 9.
--Chris Nebel
Apple Development Tools
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.