in reply to Re^3: Gui Automation using guitest
in thread Gui Automation using guitest

Yeah, i got the output. Actually where i was trying a module was not installed so it was not working.. IT works fine now.. Thank you.. But it shows what all the window contains. Now if i have to go to a particular object i will need its control id or handle of that object.. How do i get that. any help??

Replies are listed 'Best First'.
Re^10: Gui Automation using guitest
by Corion (Patriarch) on Feb 10, 2011 at 11:21 UTC

    I think now is a good time to learn about Windows and how window handles work in Windows. This topic is not Perl specific.

    You can look at the output and code of spy.pl, and see what information it gets from where, and you can compare that with your target application. In the end, you will need to learn yourself, instead of asking for step-by-step help here. I presume that "Programming Windows" by Charles Petzold, even if old, is still a good introduction to how windows work. Especially, as I remember that it does not use any fancy object oriented wrapper to the Windows API but creates windows and widgets directly. You have to learn that to go the route backwards and understand the data you get from Win32::GuiTest and what it can be used for.

Re^10: Gui Automation using guitest
by marto (Cardinal) on Feb 10, 2011 at 11:31 UTC

    If you didn't have the module installed you'd have received an error message telling you that Perl couldn't find it, which isn't 'nothing' as you said your program returned. Why didn't you mention this before? If you want help to learn you need to put some effort into asking questions. Failure to do so is a waste of peoples time.

    I suggest you spend time working through Win32::GuiTest::Examples, learning how it works. You seem to be lacking understanding of the underlying concepts involved in what you're trying to do. A forum isn't ideal for drip feeding these concepts to someone. Read and understand Using Win32::GuiTest.

      No actually i didnt get an error message. The program was not executing only.. Actually i was doing this in a vm. I tried it in my host machine and it worked. Then on checking i realized i didnt have a module installed in the vm. I understood my problem and have already started working on it.. Thank you for ur help.

        This makes no sense. If you run code in which you use a nonexistent module, for example use This::Does::Not::Exist, you'll get an error message if you've not got it installed:

        #!/usr/bin/perl use strict; use warnings; use This::Does::Not::Exist;

        Outputs:

        Can't locate This/Does/Not/Exist.pm in @INC (@INC contains: C:/strawbe +rry/perl/site/lib C:/strawberry/perl/vendor/lib C:/strawberry/perl/li +b .) at fail.pl line5. BEGIN failed--compilation aborted at fail.pl line 5.

        Clearly you would have had an error message on your VM where Win32::GuiTest was not installed.

        Update: fixed typo.

Re^10: Gui Automation using guitest
by Anonymous Monk on Feb 10, 2011 at 11:21 UTC