capsLockKey Message? -- bitesize pendingMessages tutorial

Erik Hansen erikhans08 at yahoo.com
Sat Mar 25 17:43:22 EST 2006


a great bitesize tutorial on pendingMessages.
thanks.

Erik Hansen

> Set up a loop like this:
> 
> on checkCaps
>     if the capsLockKey = "down" then put
> "Capslock ON"
>     else put "Capslock OFF"
> 
>     if the pendingMessages contains "checkCaps"
> is false then
>         send checkCaps to me in 10 ticks
>     end if
> end checkCaps
> 
> What I do is alter the repeat time (set to 10
> ticks or 1/6th of a
> second above) until it is just fast enough.
> That way you aren't taking
> more of the processor time that you need.
> 
> Don't forget to have a way to cancel the
> message when quitting or when
> it is no longer needed.
> Here is my general message cancel handler:
> 
> on cancelMessage pMsg
>     put the pendingMessages into tList
>     repeat for each line L in tList
>         if item 3 of L contains pMsg then
> cancel item 1 of L
>     end repeat
> end cancelMessage

erik at erikhansen.org    http://www.erikhansen.org

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



More information about the use-livecode mailing list