03-20-2013, 10:14 PM
I'm having trouble finding if a button is pressed within a floating toolbar (see file attached) I would like my macro to detect if the ruler is pushed, and if so click the button to deselect. If not pushed, then the macro does nothing. I first tried using control-specific actions:
but% child("" "AfxWnd80" win("Measurements" "#32770") 0x1)
For some reason, this command does nothing, as if the button is not recognized. I got around it by using accesible objects:
int w=win("Measurements" "#32770")
Acc b=acc("Measurements" "" w "#32770" "" 0x1001)
if (b.a)=84195512
b.Mouse(1)
The problem with this is that I don't seem to be able to find a condition that reliably detects whether the button is pressed.
Any pointers on how to approach this problem?
but% child("" "AfxWnd80" win("Measurements" "#32770") 0x1)
For some reason, this command does nothing, as if the button is not recognized. I got around it by using accesible objects:
int w=win("Measurements" "#32770")
Acc b=acc("Measurements" "" w "#32770" "" 0x1001)
if (b.a)=84195512
b.Mouse(1)
The problem with this is that I don't seem to be able to find a condition that reliably detects whether the button is pressed.
Any pointers on how to approach this problem?