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

Re: True / False error on comparison


  • Subject: Re: True / False error on comparison
  • From: Shane Stanley <email@hidden>
  • Date: Sun, 01 Jul 2012 17:12:27 +1000

On 01/07/2012, at 3:14 PM, Ronald Hofmann wrote:

> Any thoughts?

When you use the "repeat with x in..." statement, the variable contains a reference to an item, not the item itself. For equality comparisons you have to dereference it somehow (it happens automatically for other comparisons like "greater than"). There are several ways you can do this -- for example:

	set theFlag to (contents of theItemDisk is not equal to theStartupDisk)

But you're really doing too much work in the first place. Why not ask for "name of disks whose startup is false"?

--
Shane Stanley <email@hidden>
'AppleScriptObjC Explored' <www.macosxautomation.com/applescript/apps/>


 _______________________________________________
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

References: 
 >True / False error on comparison (From: Ronald Hofmann <email@hidden>)

  • Prev by Date: True / False error on comparison
  • Next by Date: Re: True / False error on comparison
  • Previous by thread: True / False error on comparison
  • Next by thread: Re: True / False error on comparison
  • Index(es):
    • Date
    • Thread