| [reply] [d/l] [select] |
What platform are you using?
Is it a command line script? (Or does it have a command line mode?) = many solutions available, like pipes, etc
or does it have a GUI?
If Windows + GUI then: what marto said :) | [reply] |
@zork42 .. I am using a windows 7 machine and the exe script can be run through command line
| [reply] |
It might be worth ignoring all of the following and instead concentrating on marto's post on using Win32::GuiTest !
I've used Win32::GuiTest and I know it can do the sort of things you want. But the following might be of interest so I've posted it.
================================================================
I'm afraid I have not played with IPC, also Windows does not implement some functions.
If you run your script from the command line, do you still need to press (Tab+Enter) and then (Ctrl+R)?
Before you try anything complicated you might want to try piping stuff in to and out of the script on the command line to see what you can achieve with dos's < > and |.
eg can you pipe the equivalent of (Tab+Enter) and then (Ctrl+R) into the script somehow?
If it turns out that you need to send (Tab+Enter) and then (Ctrl+R) using Win32::GuiTest then it still might be worth monitoring the output of the script to see what it's done, and when to send the keys. (But Win32::GuiTest can do useful related stuff)
These might be useful:
- system()
- Backquoted string
- open() command as filehandle for output
- open() command as filehandle for input
After that it gets very complicated, and all I can really offer is a bunch of things to read. And as I said some of this stuff is not implemented under Windows.
- perlopentut: tutorial on opening things in Perl
- perlopentut: Pipe-Opens
- perlipc: Using-open()-for-IPC
- perlipc: Bidirectional-Communication-with-Another-Process
- perlfaq8: System Interaction
- IPC::Open2: open a process for both reading and writing using open2()
- IPC::Open3: open a process for reading, writing, and error handling using open3()
- perlport: Writing portable Perl
- perlport: Writing portable Perl - DOS-and-Derivatives
- perlfunc
"Functions for processes and process groups
alarm, exec, fork, getpgrp, getppid, getpriority, kill, pipe, qx//, readpipe, setpgrp, setpriority, sleep, system, times, wait, waitpid"
(These are the sort of functions that Windows might not implement)
| [reply] |