Reliable Perl Automation

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Perl Beginner
    New Member
    • Sep 2007
    • 57

    #1

    Reliable Perl Automation

    Hi All,
    I have a very extensive Perl script using Win32. This is an automation script which manipulates various windows using the mouse and keyboard (using Win32::GuiTest) . The various windows that I am manipulating are part of a software program that was written in Java. However, my Perl script is layered on top of this program, so it does not affect the Java code (I hope that makes sense). In other words, my Perl automation is just taking the place of a person actually sitting at the computer and using this program by clicking through the windows.
    The problem is sometimes when I run the Perl script it works just fine. And I get the expected outcome. And other times, I run it and the windows lock up and everything gets all out of sync. So now it’s like every run is just a crap shoot…I just run it and see if ‘this time’ it will work properly.
    Is there something that I need to add to my Perl script that will make sure the process runs without any hiccups and is reliable every time I run it? Does this have to do with memory or the ‘AllocateVirtua lBuffer’ function that I keep seeing in Perl, but i can't find much detail on it?
    Any thoughts?
    Terra
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    If the java program always works with a human operator instead of perl, then I think we can safely assume perl is doing something that causes the problem. Having said that rather obvious bit of information, if the errors/problems are always random, I have no idea how you will track it down. Try running perl in debug mode and see if you can step through the program while it runs:

    perl -d

    Comment

    Working...