Re: (no subject)
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>) |