Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
condition : button changes status
hello at all this is my question :

I need to create a macro running at this condition
I have a software where a button changes status from enabled (red colored) to disabled (white colored)
when this button of the software change status from enabled to disabled I need to active a robot sequence to activate again

I know how to record the sequence to do and insert in the macro code but i dont kno how to fix the contition (changing status of the button)

anyone can help me !?

thanks in advance
Several ways can be possible.

1. Trigger "Accessible object".
2. Wait for control disabled.
3. Wait for accessible object disabled.
4. Wait for color.

1 is the best. It can be used only if the button is an accessible object and it fires events when disabled. You'll need trigger data: menu -> Tools -> Output -> Log -> Acc trigger events. More info in QM help.
thanks I will go to test also if i am new in this kind of programming
I'm trying to figure out how to do it, I'm definitely missing something or a lot, for me it's the first time I try to create a macro.
this is what I do:

File - New - Macro
right Click on the macro name - Items Properties
accessible object - statechange
id object = CUSTOM (I think)
click on the upper right menu - Find accessible object

now I click and take pressed DRAG and I select the button I need to monitor the change

now I copy and paste the "Class" value on "class" field of the properties window and the

win("WSJT-X   v1.9.0-rc4   by K1JT" "Qt5QWindowIcon")

on the Text field of the properties window

I close the "find accessible bject" windows and come back to "properties window"

I click next and now I stop because first of all I dont know if I did all correct and second because I realy dont know how to continue !!!

Attached Files Image(s)
Dialog "Find accessible object" in this case can be useful if you want to know whether the button is an accessible object. Now you know, it is.

Now you need trigger data. For it use another dialog: menu Tools -> Output -> Log -> Acc object events. Click OK. It will show events in the QM output.

When the button becomes disabled or enabled, click (uncheck) the same menu item. It stops recording events.

Then in the output look for the event. It is probably STATECHANGED, and it should contain button name. Use this event data in the Properties dialog to create trigger.

Forum Jump:

Users browsing this thread: 1 Guest(s)