http://www.perlmonks.org?node_id=1015813


in reply to Re^6: Win32::GuiTest control id
in thread Win32::GuiTest control id

Let's break this down into steps. First, you need to get the window IDs of the buttons that you want to click on. You've got two routes. Find them yourself using utilities like I had suggested or using Win32::GuiTest to write your own code to dig through the structure of the program. Or you can get the information from the program's source code (or from someone maintaining that source code). I really don't see how you can get around that.

Next, there's the clicking of the buttons. Not trying to be mean here, but have you taken the time to read through Win32::GuiTest's documentation? You keep mentioning only PushButton and MouseClick functions. If you take another look at that documentation, you'll notice that one of the first functions it describes is one called SendMouse.

Again, I'll point you to take a look at the code I posted in Re: Problems with WIN32::GUITEST. Look at the section for the 'mouse' emulation. That section is using SendMouse to click on the buttons. If you run that code, you should see the mouse cursor moving to the buttons. Try using something like that with your code.

If you still can't get the button clicks going, try writing some short code to push buttons on the calc.exe from Windows and you can post that code to get more help on grasping the basics concepts.

Replies are listed 'Best First'.
Re^8: Win32::GuiTest control id
by abt (Novice) on Feb 04, 2013 at 09:40 UTC

    Tnx dasgar, I am a step closer now. The calculator code is working. My problem seems to be a deeper issue since the window containing the button is based on macromedia flash. Now looking in a complete different direction sinc I fail to install Wx and its ActiveX and Flash components on the target computer. "Perl stopped working" while installing Wx or Padre via cpan. It fails to install Wx modules. Tried this on a differnt computer - which i unfortunatly can't use for the task- and there I had no problems installing. Have no clue yet though what the issue with installing the modules is. Can't be a module issue since it installs perfectly on an other computer. Most probably enviroment problem. I suspect gcc compiler setting, but not sure. Tnx for the help and effort putted into answering and trying to let me understand.

      Extra inforamtion: Yes I tried SendMouse and it works okay. Can actually click a button, but need the exact position information. Tried most functions in there. The issue I have seems to be of a diffent type as what I expacted. Btw. using Win7 (64) and perl (Strawberry 5.16 (64).