Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
working with buttons
#1
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?


Attached Files Image(s)
   


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)