When you run the program use Win32::Process::Create (bundled with ActiveState Perl). This sets a process object, and you can call a GetProcessID() method on it to get the PID.
Yes, thank you! The problem is how I perform the findWindowLike() from the Win32::GuiTest module with the PID of the newly created process instead of the "window caption" regular expression.
I want to automate only the window of the program I run and not some other instance of it!