• 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: "J. Stewart" <email@hidden>
  • Date: Sun, 28 May 2006 21:54:57 -0400

On 5/28/06 at -0600 Robert Poland said this

>Got a puzzler;
>
>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 isn't "",  i.e. if either side of the test evaluates to true it beeps. :)

Assuming nothing is selected, try this -

tell application "Finder"
	set brace to selection is not {}
	set quote to selection is not ""
	return {brace, quote}
end tell

--> {false, true}

JBS
--
Never miss a good chance to shut up! — Will Rogers
 _______________________________________________
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

References: 
 >(no subject) (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: (no subject)
  • Next by Date: Re: iTunes : "File permission error"
  • Previous by thread: Re: (no subject)
  • Next by thread: Lists and network volumes
  • Index(es):
    • Date
    • Thread