Tracking the Mouse Loc While Another App is Frontmost |
|
To test, click the button, and then switch to another app and move it (if necessary) to see the field in your stack... the field should constantly update with the screenMouseLoc even when another app is in the foreground. When you want it to stop, click the button again.on mouseUp if "trackMouse" is not in the pendingMessages then trackmouse else CancelPending "all" end if end mouseUp on trackMouse put the screenMouseLoc into fld 1 send "trackMouse" to me in 20 milliseconds end trackMouse on CancelPending pMsg put the pendingMessages into tPending if (pMsg <> "") and (pMsg <> "all") then filter tPending with "*," & pMsg & ",*" end if repeat for each line tMsg in tPending cancel item 1 of tMsg end repeat end CancelPending
Posted on 3/25/2005 by Ken Ray to the MetaCard list