PDA

View Full Version : manipulating button in application window



jpmunroe
December 26th, 2002, 01:03 PM
I am trying to get girder to press a button in another application window. I have managed to get girder to open the application by adding a new command and adding a girder eventstring of 'girderopen'. I have added a second command and captured the button click.

Now if I test the first command, the application opens and if I then test the second the button is clicked. When I close and reopen girder the application is opened (using the girderopen event), but the button is not clicked. Even if I test it, the button is not clicked, is this because girder captures the position of the window or something?

In short:

- I need girder to open the application (which I have got working it seems)
- I need the button in the application to be pressed when the window is opened automatically by the first command. The button is listed in the 'selected tasks childobjects' column in the target option of the command tab. I just don't know how to get it to manipulate that.

Thanks for any help or pointers on what I need to do.

James

sibix
December 26th, 2002, 01:30 PM
I assume it looks like this:

Multigroup
|-Open that window
|-Click the button
|_EventString

The EventString must be mapped to the MultiGroup (not to a command within the MultiGroup).

The first thing you'll probably need to get it working is a wait command to wait for the window to open:

Multigroup
|-Open that window
|-WAIT
|-Click the button
|_EventString

You should start with a big timeout (maybe 5000). So the window has enough time to open. You can also check the wait for window box and target the window.

I guess the targetting is the part where the error is to find. You will have to play around a little with that. As we probably don't have the app that you want to control, we can't help you out on this.

jpmunroe
December 26th, 2002, 01:38 PM
I don't have a multigroup (at least that im aware) its just a folder with the first command (to open the app) with the girderopen eventstring then the second command to press the button with no eventstring . I will try to set it up like you said and take it from there.


The application I am trying to use is transcoderwin32 0.2.0, it can be downloaded from

http://sourceforge.net/project/showfiles.php?group_id=59041

When the app opens, its the 'connect' button I need to be pressed, its a fairly simple layout.

Thanks

sibix
December 26th, 2002, 02:14 PM
Pushing the Connect button can be done with a Command (WParam 100, LParam 328670, Target - Name: StreamTranscoder, Class Name: wxFrameClass, Executable: streamTranscoder.exe, ChildClass: wxCanvasClass)

jpmunroe
December 26th, 2002, 02:49 PM
Many thanks for your help. I have it working now using a multigroup command with a wait for 5000 in the middle like you suggested.

How did you arrive at the values of WParam 100, LParam 328670? What exactly do they mean? Just in case I want to manipulate other windows in the future...

Thanks

James

sibix
December 26th, 2002, 03:13 PM
You can decrease the timeout step by step now. As soon as it stops working, you increase it a little bit to be safe.

Actually I got no clue what these values exactly mean. They represent data that is sent to the application.

You want to know how I got the values. I captured the clicking on the button. So I got a couple of entries in the capture list. The first one was the left click action followed by a couple of commands. Then I tested these events. The left click action and the first command seemed to work fine. As I prefer sending commands rather than simulating left clicks (I guess apps do as well), I chose that one. Then I checked the Target setting but it didn't need any editing.