Re: Accessing item elements in Applescript
Re: Accessing item elements in Applescript
- Subject: Re: Accessing item elements in Applescript
- From: Brian Webster <email@hidden>
- Date: Fri, 6 Dec 2002 15:06:48 -0600
On Friday, December 6, 2002, at 02:10 PM, matt neuburg wrote:
On Thu, 5 Dec 2002 17:33:09 -0600, Brian Webster <email@hidden>
said:
tell application "System Events"
get every item of disk "Macintosh HD"
end tell
This returns you a list of items on the root level on your hard drive.
Fine. However, if you try the following:
tell application "System Events"
get item 1 of disk "Macintosh HD"
end tell
What you get back is a reference to the disk itself, not the first
item
it contains.
So what I'm wondering is:
1. Has anyone run into this before and is it reproducible on other
machines?
2. Any idea what on earth is happening to cause this behavior?
3. Any idea on how to get around it?
The way to work around is to script the Finder instead of System
Events (even though we're presumably not supposed to). m.
Scripting the file system isn't really what I'm concerned about. The
reason I discovered this in the first place is that I'm trying to
implement a similar functionality (with different data) in my own
application but I'm running into the same bug that's causing this
behavior in System Events. So I'm looking for a workaround from the
implementation side, not the scripting side.
--
Brian Webster
email@hidden
http://homepage.mac.com/bwebster
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.