• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Michelle Steiner <email@hidden>
  • Date: Sun, 28 May 2006 18:08:42 -0700


On May 28, 2006, at 5:51 PM, Robert Poland wrote:

tell application "Finder"
	if selection is not {} or selection is not "" then
		beep
	end if
end tell

When run from Smile with nothing selected in the Finder the above yields a beep.

Am I missing something?

Yes; the selection is never "", so the statement is always true.

I don't know why you have 'or selection is not "' there in the first place; a finder selection is always a property (but looks like a list). It is never a string.

If you replace "or" with "and" it will not beep if nothing is selected, and will be if anything is selected because 'or selection is not "' is always true.

-- Michelle

--
I'm at an age where I can satisfy my wants without too many guilt feelings.


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: (no subject)
      • From: Luther Fuller <email@hidden>
References: 
 >(no subject) (From: Robert Poland <email@hidden>)

  • Prev by Date: (no subject)
  • Next by Date: Re: (no subject)
  • Previous by thread: (no subject)
  • Next by thread: Re: (no subject)
  • Index(es):
    • Date
    • Thread