I have an exe I need to be able to automatically run and send an "enter" followed by an alt+F4 (close). Here's what I have so far:
use strict; use warnings; use lib 'f:\scripts524'; use English; my $cmd='CreateFile.exe'; my $pid = open CMD, '|-', $cmd or die $!; sleep 2; print CMD "\r"; print CMD "\n"; print CMD "\f"; print CMD hex '6B'; print CMD oct 153; close CMD; waitpid($pid,0);
My exe runs, but isn't getting the automated input. I haven't had much luck in my research so far. Is this even possible?
In reply to Run .exe and send input by ksublondie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |