Welcome to Help

  • mark montemuro

    mark montemuro - 2008-08-08

    From a Perl script,I'm trying to use GUI or GuiTest to bring a minimized window to the foreground. Any ideas of what I'm doing wrong. I'm running on XP.

    When running this program below, I do have paint up, but minimized.

    * Could not set the window id: 1843712 a
    * Window id: 1843712 brought to foregrou
    1843712>        'untitled - Paint'

    use Win32::GuiTest qw(:ALL);
    use Win32::GUI;

      $Win32::GuiTest::debug = 0; # Set to "1" to enable verbose mode

      my @windows = FindWindowLike(0, "Paint", "");
      print "Windows:@windows:\n";
      for (@windows) {
         my $success = 1;

         if ( SetActiveWindow($window) ) {
             print "* Successfully set the window id: $window active\n";
         else {
             print "* Could not set the window id: $window active\n";
             $success = 0;
         if (SetForegroundWindow($window) ) {
             print "* Window id: $window brought to foreground\n";
         else {
             print "* Window id: $window could not be brought to foreground\n";
             $success = 0;

          print "$_>\t'", GetWindowText($_), "'\n";

  • eundv

    eundv - 2008-10-15

    I am very keen to use win32-guitest.  However, having difficulty getting started:


    C:\Temp>dir win*
    Volume in drive C has no label.
    Volume Serial Number is 544E-949A

    Directory of C:\Temp

    12/15/2007  05:01 PM               430 Win32-GuiTest.ppd
    12/15/2007  04:59 PM           177,055 Win32-GuiTest.tar.gz
                   2 File(s)        177,485 bytes
                   0 Dir(s)  47,754,022,912 bytes free

    C:\Temp>ppm install c:\temp\win32-guitest.ppd
    ppm install failed: The PPD does not provide code to install for this platform

    C:\Temp>more win32-guitest.ppd
    <SOFTPKG NAME="Win32-GuiTest" VERSION="1,55,0,0">
        <ABSTRACT>Perl GUI Test Utilities.</ABSTRACT>
        <AUTHOR>Dennis K. Paulsen (ctrondlp@cpan.org), Ernesto Guisado (erngui@acm.org)</AUTHOR>
            <OS NAME="MSWin32" />
            <ARCHITECTURE NAME="MSWin32-x86-multi-thread-5.8" />
            <CODEBASE HREF="Win32-GuiTest.tar.gz" />



    I am willing to provide any description of my platform requested.
    I am willing to try any fix/workaround suggested.

    Thank you in advance for your aide.



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks