• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing item elements in Applescript
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: basic Obj-C lesson (was runtime error with NSArray no more!)
  • Next by Date: Enhanced TableView (was: Printing two views, together)
  • Previous by thread: Accessing item elements in Applescript
  • Next by thread: Objective-C++ compiler updates?
  • Index(es):
    • Date
    • Thread