PDA

View Full Version : Girder to click a special Child-Class "Button"



Blackhole
September 10th, 2003, 01:24 AM
Hi!

I want Girder to control Olympus DSS Player Lite.
To do this, I created a command and used "Command"->"Left click". When I choose the destination of the Left-Click, I go to e.g. the "Play"-button and Girder detects it as Child-Class "Button".
Unfortunately, all Buttons (also "Stop", "Forward" etc.) are of Child-Class "Button". Therefore, Girder clicks ALL of these buttons, when I trigger the event.
When I choose Check Selection -> Find in Girder, Girder finds all 5 Buttons as Child-Class "Button" and gives the Id # of them.

How can I make Girder press exactly ONE of those buttons??

Example:
I have
3801962 Button
2950002 Button
and only want this command to click the 3801962 Button.

Thank you very much in advance.

Blackhole

ps: Unfortunately, the software cannot be controlled by keys... :(
:cry:

Bitmonster
September 10th, 2003, 02:48 AM
This isn't always reliable but you can try it:

You can't target by the ID# because this is generated at runtime of the program, so it might be different the next time you start your program. But often the order of the buttons stays the same. And therefor you have the checkbox "Only send to first match" and the number field next to it. So if you want to target the third button, just check this box and type 3 into the field. Use as much of the other fields (Name, Class Name, Executable, Child Name, Child Class) as you need or can. Now you can try it with the "Find" button. If your configuration is right, the textbox will show the Handle and other fields of the target and you can compare it to Childobjects list if this is the one you want.

So you see the checkbox should better be called "Only send to n-th match"

Bitmonster
September 10th, 2003, 02:58 AM
BTW: If this doesn't help, you can try a multigroup with "Window->Relative Mouse move" and use the window of the application as "Target". Then you have to find the right X and Y value to get the mouse on the button you want. Now you can use "Mouse"->"Left click" to press it.

Blackhole
September 10th, 2003, 03:19 AM
Thanx. The first proposal works fine.
Another question that followed: Can I make Girder "keep the mouse-button pressed" as long as the Event is active or another event (e.g. the contrary event (here on a serial line: change of state)) does not occur???

Tnx
Blackhole

Bitmonster
September 10th, 2003, 03:26 AM
This isn't easy. You can try the "Advanced Mouse Event" plugin. It has options for "button down only" and "button up only".