Re: True / False error on comparison
Re: True / False error on comparison
- Subject: Re: True / False error on comparison
- From: Luther Fuller <email@hidden>
- Date: Sun, 01 Jul 2012 08:02:58 -0500
On Jul 1, 2012, at 12:14 AM, Ronald Hofmann wrote: I have a list theListe with the Names of a disks whose size > 0 And I have a variable theStartupDisk which contains the name of the startup disk. tell application "Finder" set theStartupDisk to name of startup disk --> "MacOSX" set theListe to (name of disks whose size is greater than 0) as list --> {"Backup1", "Graphics Tools", "MacOSX", "MacOSX2"} end tell
You are inviting a problem by referring to disks by name. You can have two (or more) disks mounted which have the same name. This will confuse both you and AppleScript.
Do something like this ...
set theStartupDisk to path to startup disk -- an alias tell application "Finder" set theListe to (every disk whose size is greater than 0) as alias list set startupID to id of theStartupDisk
repeat with aDisk in theListe -- for example if id of aDisk = startupID then display dialog "theStartupDisk = " & theStartupDisk as text end if end repeat end tell
|
_______________________________________________
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