• 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: Index list from the Finder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Index list from the Finder


  • Subject: Re: Index list from the Finder
  • From: Clark Martin <email@hidden>
  • Date: Wed, 25 Jul 2007 22:14:35 -0700

At 9:46 PM -0400 7/25/07, Daniel Brieck Jr. wrote:
Hello,


I am attempting to run the the following script and I am getting a "Finder got an error: Can't continue ." error message. Any idea how I can get this to work?


tell application "Finder"

set NameDiskList to get name of every disk -- This works
set indexList to get the index of every disk -- Getting a problem here on INDEX and don't know why


end tell

I just tried fooling around with this.

When I ran this script:

tell application "Finder"

	set NameDiskList to name of every disk -- This works
	set theDisks to every disk
	repeat with i in theDisks
		get index of i
	end repeat
	set indexList to index of every disk
end tell

The repeat loop got the index of the first disk, the startup disk okay. It choked with the same error "Finder got an error: Can't continue ." on the pseudo disk "Network". The pseudo disk "Servers" also returns the same response.



I know that it is a valid property from the following scripts results and the Finders dictionary. Is there some way to get around the error.

tell application "Finder"

	set disk_list to get properties of every disk

end tell


The index value for Network and Servers is 'missing value'.

I looked at their properties and the two pseudo disks have a capacity of 0. So I tried this:

tell application "Finder"
	set indexList to index of every disk whose capacity is greater than 0
end tell

And it worked. It should do what you want as the only disks it will ignore are empty.
--
Clark Martin
Redwood City, CA, USA
Macintosh / Internet Consulting


"I'm a designated driver on the Information Super Highway"
_______________________________________________
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
  • Follow-Ups:
    • Re: Index list from the Finder - with Size
      • From: "Daniel Brieck Jr." <email@hidden>
References: 
 >Index list from the Finder (From: "Daniel Brieck Jr." <email@hidden>)

  • Prev by Date: Re: Filemaker: referring to a "mirror" cell value
  • Next by Date: Exporting a text field from Filemaker into a text or rtf file.
  • Previous by thread: Re: Index list from the Finder
  • Next by thread: Re: Index list from the Finder - with Size
  • Index(es):
    • Date
    • Thread