• 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
Is it possible to set up an 'instant' idle handler
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Is it possible to set up an 'instant' idle handler


  • Subject: Is it possible to set up an 'instant' idle handler
  • From: "Arthur J. Knapp" <email@hidden>
  • Date: Wed, 09 Oct 2002 10:43:39 -0400

> Date: Tue, 8 Oct 2002 21:00:27 -0300
> From: Bill Briggs <email@hidden>
> Subject: Re: Is it possible to set up an 'instant' idle handler

> At 1:05 PM -0400 08/10/02, Marc K. Myers wrote:
>> AppleScript must have evaluated the boolean as an integer 1. I
>> should have looked out for sneaky underhanded background coercions!

> If only we could perform that coercion explicitly.

Yes, so we could do cool things like this:

repeat with i from (true) to (false) by -(true)
...

if item true of myList is true then set item true to false

;-)

The nicest thing about implicit boolean conversions is how they can
simplify condition statments. I sometimes use this handler to emulate
this:

on IsTrue( v )
return ( {v} is not in {false,0,"",missing value} )
end

on CheckParameter( param )

if ( not IsTrue( param ) ) then

set param to "default param"

...


{ Arthur J. Knapp, of <http://www.STELLARViSIONs.com>
a r t h u r @ s t e l l a r v i s i o n s . c o m
}
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Is it possible to set up an 'instant' idle handler
      • From: Emmanuel <email@hidden>
  • Prev by Date: a question on scripting Eudora (guess who this is for..)
  • Next by Date: RE: Quicktime Batch file
  • Previous by thread: Re: Is it possible to set up an 'instant' idle handler
  • Next by thread: Re: Is it possible to set up an 'instant' idle handler
  • Index(es):
    • Date
    • Thread