• 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
True / False error on comparison
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

True / False error on comparison


  • Subject: True / False error on comparison
  • From: Ronald Hofmann <email@hidden>
  • Date: Sun, 01 Jul 2012 07:14:11 +0200

Hi all,
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

# Now I have a repeat loop and I want to process all Items except the startup disk. 
# I´m doing this by creating a flag which checks if theItemDisk is not equal to my theStartupDisk 

repeat with theItemDisk in theListe


set theFlag to (theItemDisk is not equal to theStartupDisk)


if theFlag then
log theItemDisk & ": " & theFlag
end if


end repeat

Unfortunately theFlag always returns true. It should return false if it comes to item 3 of the list.

I´m missing something I guess, but what is it?
Any thoughts?

Greetings from Switzerland, Ronald Hofmann
---
 _______________________________________________
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: True / False error on comparison
      • From: Luther Fuller <email@hidden>
    • Re: True / False error on comparison
      • From: Brian Christmas <email@hidden>
    • Re: True / False error on comparison
      • From: Shane Stanley <email@hidden>
  • Next by Date: Re: True / False error on comparison
  • Next by thread: Re: True / False error on comparison
  • Index(es):
    • Date
    • Thread