raugert wrote: ↑Thu Mar 08, 2018 5:37 pm
Frankly, I'm not sure what command is actually sent when you click an object when in pointer mode.
This at least should be easier to find out. In the developer menu you should see 'message watcher', which will pretty much dispatch any messages you can tap into.
As for what your trying to accomplish, mind you, this isn't perfect, and I'm not even sure it is what you are asking about, nor is it polished in any way. I'm sure there are better ways to do it, as well.
I set this to the two separate mouse events, down and up. The code is all in the stack, which is ultimately where all messages go to die
Code: Select all
on mouseDown
if the first word of the target is not "card" then
put "The loc is [" & the loc of the target & "], the height is " & the height of the target & ", the width is " & the width of the target into field "Field"
end if
end mouseDown
on mouseUp
if the first word of the target is not "card" then
if the mouseLoc is within the rect of the target then
choose pointer tool
select the target
else
// do nothing to change the cursor on a click / drag type motion...
end if
end if
end mouseUp
This won't give you information about fields, but pretty much anything else you click on aside from the card should report back. Hope it helps.
*Edit, don't forget to set a separate button to change your tool back to browse, or in a standalone you are pretty well stuck if you don't rig it somehow.
*Edit 2, this seemed to work, code stuck in your restoring buttons script -
Code: Select all
on mouseUp
if the mouseLoc is within the rect of me then
choose browse tool
end if
end mouseUp