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)
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.