in reply to Re: Automating a Win10 GUI
in thread Automating a Win10 GUI

I have heard about that module. When I run ActiveState ppm (Perl Package Manager), I don't see it as a package option for the latest AS version. There a lot of reasons why that could happen. I haven't investigated why that is yet.

I am hoping to find a tool that does most of the work, with me just writing some small amount of extra code. I am hoping for an option better than Win32::GuiTest. If "GuiTest" winds up being "the answer", then likely follow-on questions will involve complicated build problems that Active State has not solved.

Update: I installed the cpan module from Active State. And lo and behold, installation of Win32::GuiTest appeared to work. I will investigate this module further.

cpan> install Win32::GuiTest Running install for module 'Win32::GuiTest' Fetching with LWP: http://ppm.activestate.com/CPAN/authors/id/K/KA/KARASIK/Win32-GuiTest- +1.64.tar.gz Fetching with LWP: http://ppm.activestate.com/CPAN/authors/id/K/KA/KARASIK/CHECKSUMS Checksum for C:\Perl64\cpan\sources\authors\id\K\KA\KARASIK\Win32-GuiT +est-1.64.tar.gz ok Scanning cache C:\Perl64/cpan/build for sizes ...................................................................... +......DONE Win32-GuiTest-1.64/ Win32-GuiTest-1.64/README Win32-GuiTest-1.64/META.yml Win32-GuiTest-1.64/Makefile.PL Win32-GuiTest-1.64/Recorder/ Win32-GuiTest-1.64/Recorder/Copying.txt Win32-GuiTest-1.64/Recorder/README.txt Win32-GuiTest-1.64/Recorder/Win32GuiTest.exe Win32-GuiTest-1.64/CHANGES Win32-GuiTest-1.64/GuiTest.xs Win32-GuiTest-1.64/lib/ Win32-GuiTest-1.64/lib/Win32/ Win32-GuiTest-1.64/lib/Win32/GuiTest/ Win32-GuiTest-1.64/lib/Win32/GuiTest/Examples.pm Win32-GuiTest-1.64/lib/Win32/GuiTest/Cmd.pm Win32-GuiTest-1.64/lib/Win32/GuiTest/GuiTest.pc Win32-GuiTest-1.64/lib/Win32/GuiTest.pm Win32-GuiTest-1.64/dibsect.h Win32-GuiTest-1.64/typemap Win32-GuiTest-1.64/MANIFEST Win32-GuiTest-1.64/META.json Win32-GuiTest-1.64/RSNDMSG.h Win32-GuiTest-1.64/perlobject.map Win32-GuiTest-1.64/t/ Win32-GuiTest-1.64/t/01_basic.t Win32-GuiTest-1.64/t/06_sendkeys.t Win32-GuiTest-1.64/t/02_calc.t Win32-GuiTest-1.64/t/03_cpl.t Win32-GuiTest-1.64/t/04_std.t Win32-GuiTest-1.64/t/05_which.t Win32-GuiTest-1.64/eg/ Win32-GuiTest-1.64/eg/paint_abs.pl Win32-GuiTest-1.64/eg/winbmp.pl Win32-GuiTest-1.64/eg/fonts.pl Win32-GuiTest-1.64/eg/showcpl.pl Win32-GuiTest-1.64/eg/wptr.pl Win32-GuiTest-1.64/eg/make_eg.pl Win32-GuiTest-1.64/eg/waitwindow.pl Win32-GuiTest-1.64/eg/selecttabitem.pl Win32-GuiTest-1.64/eg/pushbutton.pl Win32-GuiTest-1.64/eg/paint.pl Win32-GuiTest-1.64/eg/start.pl Win32-GuiTest-1.64/eg/excel2.pl Win32-GuiTest-1.64/eg/spy--.pl Win32-GuiTest-1.64/eg/notepad_text.pl Win32-GuiTest-1.64/eg/showwin.pl Win32-GuiTest-1.64/eg/rawkey.pl Win32-GuiTest-1.64/eg/ask.pl Win32-GuiTest-1.64/eg/calc.pl Win32-GuiTest-1.64/eg/notepad.pl Win32-GuiTest-1.64/eg/excel.pl Win32-GuiTest-1.64/eg/keypress.pl Win32-GuiTest-1.64/eg/iswindowstyle.pl Win32-GuiTest-1.64/eg/tab.pl Win32-GuiTest-1.64/eg/spy.pl Win32-GuiTest-1.64/eg/showmouse.pl Win32-GuiTest-1.64/eg/menuselect.pl Win32-GuiTest-1.64/eg/which.pl Win32-GuiTest-1.64/DibSect.cpp Configuring K/KA/KARASIK/Win32-GuiTest-1.64.tar.gz with Makefile.PL Checking if your kit is complete... Looks good Generating a dmake-style Makefile Writing Makefile for Win32::GuiTest Writing MYMETA.yml and MYMETA.json KARASIK/Win32-GuiTest-1.64.tar.gz C:\Perl64\bin\perl.exe Makefile.PL INSTALLDIRS=site -- OK Running make for K/KA/KARASIK/Win32-GuiTest-1.64.tar.gz cp lib/Win32/GuiTest.pm blib\lib\Win32\GuiTest.pm cp lib/Win32/GuiTest/GuiTest.pc blib\lib\Win32\GuiTest\GuiTest.pc cp lib/Win32/GuiTest/Examples.pm blib\lib\Win32\GuiTest\Examples.pm cp lib/Win32/GuiTest/Cmd.pm blib\lib\Win32\GuiTest\Cmd.pm Running Mkbootstrap for GuiTest () "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e chmod -- 644 "GuiTest. +bs" "C:\Perl64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Gui +Test.bs blib\arch\auto\Win32\GuiTest\GuiTest.bs 644 "C:\Perl64\bin\perl.exe" -IC:\Perl64\lib -IC:\Perl64\lib "C:\Perl64\li +b\ExtUtils\xsubpp" -typemap C:\Perl64\lib\ExtUtils\typemap -typemap +C:\Perl64\cpan\build\Win32-GuiTest-1.64-0\perlobject.map -typemap C:\ +Perl64\cpan\build\Win32-GuiTest-1.64-0\typemap GuiTest.xs >xstmp.c && + "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e mv -- xstmp.c GuiTes +t.cpp C:\Perl64\site\bin\gcc.exe -c -s -O2 -DWIN32 -DWIN64 -DCONSE +RVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_C +ONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfield +s -s -O2 -DVERSION=\"1.64\" -DXS_VERSION=\"1.64\" "-IC:\ +Perl64\lib\CORE" GuiTest.cpp C:\Perl64\site\bin\gcc.exe -c -s -O2 -DWIN32 -DWIN64 -DCONSE +RVATIVE -DPERL_TEXTMODE_SCRIPTS -DUSE_SITECUSTOMIZE -DPERL_IMPLICIT_C +ONTEXT -DPERL_IMPLICIT_SYS -fwrapv -fno-strict-aliasing -mms-bitfield +s -s -O2 -DVERSION=\"1.64\" -DXS_VERSION=\"1.64\" "-IC:\ +Perl64\lib\CORE" DibSect.cpp "C:\Perl64\bin\perl.exe" -MExtUtils::Mksymlists \ -e "Mksymlists('NAME'=>\"Win32::GuiTest\", 'DLBASE' => 'GuiTest', + 'DL_FUNCS' => { }, 'FUNCLIST' => [], 'IMPORTS' => { }, 'DL_VARS' = +> []);" C:\Perl64\site\bin\g++.exe GuiTest.def -o blib\arch\auto\Win32\GuiTest +\GuiTest.dll -mdll -s -static-libgcc -static-libstdc++ -L"C:\Perl64\l +ib\CORE" -L"C:\MinGW\x86_64-w64-mingw32\lib" GuiTest.o DibSect.o "C +:\Perl64\lib\CORE\libperl524.a" -lmoldname -lkernel32 -luser32 -lgdi3 +2 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -lnet +api32 -luuid -lws2_32 -lmpr -lwinmm -lversion -lodbc32 -lodbccp32 -lc +omctl32 -Wl,--enable-auto-image-base "C:\Perl64\bin\perl.exe" -MExtUtils::Command -e chmod -- 755 blib\arch +\auto\Win32\GuiTest\GuiTest.dll KARASIK/Win32-GuiTest-1.64.tar.gz C:\Perl64\site\bin\dmake.exe -- OK Running make test "C:\Perl64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Gui +Test.bs blib\arch\auto\Win32\GuiTest\GuiTest.bs 644 "C:\Perl64\bin\perl.exe" "-MExtUtils::Command::MM" "-MTest::Harness" " +-e" "undef *Test::Harness::Switches; test_harness(0, 'blib\lib', 'bli +b\arch')" t/*.t t/01_basic.t ..... ok t/02_calc.t ...... skipped: this test is phased out t/03_cpl.t ....... ok t/04_std.t ....... ok t/05_which.t ..... ok t/06_sendkeys.t .. ok All tests successful. Files=6, Tests=72, 10 wallclock secs ( 0.03 usr + 0.06 sys = 0.09 CP +U) Result: PASS KARASIK/Win32-GuiTest-1.64.tar.gz C:\Perl64\site\bin\dmake.exe test -- OK Running make install Prepending C:\Perl64\cpan\build\Win32-GuiTest-1.64-0/blib/arch C:\Perl +64\cpan\build\Win32-GuiTest-1.64-0/blib/lib to PERL5LIB for 'install' "C:\Perl64\bin\perl.exe" -MExtUtils::Command::MM -e cp_nonempty -- Gui +Test.bs blib\arch\auto\Win32\GuiTest\GuiTest.bs 644 Files found in blib\arch: installing files in blib\lib into architectu +re dependent library tree Installing C:\Perl64\site\lib\auto\Win32\GuiTest\GuiTest.dll Installing C:\Perl64\html\site\lib\Win32\GuiTest.html Installing C:\Perl64\html\site\lib\Win32\GuiTest\Cmd.html Installing C:\Perl64\html\site\lib\Win32\GuiTest\Examples.html Installing C:\Perl64\site\lib\Win32\GuiTest.pm Installing C:\Perl64\site\lib\Win32\GuiTest\Cmd.pm Installing C:\Perl64\site\lib\Win32\GuiTest\Examples.pm Installing C:\Perl64\site\lib\Win32\GuiTest\GuiTest.pc Appending installation info to C:\Perl64\lib/perllocal.pod KARASIK/Win32-GuiTest-1.64.tar.gz C:\Perl64\site\bin\dmake.exe install -- OK cpan>

Replies are listed 'Best First'.
Re^3: Automating a Win10 GUI
by marto (Cardinal) on Jan 23, 2020 at 09:19 UTC

    Define better? The question you posted had a list of things you had to do in order to automate a couple of programs. The module I suggested provides convenient ways to achieve this. The module documentation is pretty clear on where to get a PPD file, how to build from source. I don't recall having issues with either method when using AS perl, or simply using cpan/cpanm. A quick search shows AS do offer a version, though perhaps not built for your version of AS perl. Make life easier in yourself, switch to Strawberry perl or just follow the documentation for building it yourself ;).

      Hi Marto!
      I mistakenly believed that compiling and installing a CPAN package into AS would be hard, because in the past it was! This was far easier than it used to be.

      I have updated my previous post with actual text of the installation. It appears to have worked and now I have some more homework to do.

      Thank you, Marto

        Glad to hear you got it installed. Report back if you have problems. Super Search will return some great posts using this module.