MouseLoc
Ken Ray
kray at sonsothunder.com
Fri Mar 25 15:10:08 EST 2005
On 3/25/05 1:54 PM, "Simon Lord" <slord at marelina.com> wrote:
> How can I get this to work:
>
> put the screenmouseLoc into fld "curpos"
>
> ... if the mc app is minimized, IE it's *not* the currently focused app?
Here you go - I made a stack with a button and a field. The script of the
button is (watch line wraps):
on mouseUp
if "trackMouse" is not in the pendingMessages then
trackmouse
else
CancelPending "all"
end if
end mouseUp
on trackMouse
put the topLeft of this stack into tTL
put ((item 1 of tTL) + the mouseH) & "," & \
((item 2 of tTL) + the mouseV) into tMousePos
put tMousePos 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
Works for me...
Ken Ray
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the metacard
mailing list