Hi Everyone,
I’ve done some searching and I haven’t be able to fine a solution to my problem. I’m using the following bit of code in XCode and though it works fine and places the mouse position into the text fields as it should, it only works once. Once that is until I move the window then the event will work again. It is almost as though the event is not being disposed of… Anyone have any ideas?
Regards
Chris
on mouse up theObject event theEvent
if name of theObject is “btn” then
set {MpX, MpY} to location of theEvent
set contents of text field “x” of window “main” to (MpX) as string
set contents of text field “y” of window “main” to (MpY) as string
end if
end mouse up