#!/PERL5 use strict; use Win32::GuiTest qw(FindWindowLike SetForegroundWindow SendKeys); $ARGV[0] =~ s/\[!20\]//g; #Remove [!20] WinkeySim delays $ARGV[0] =~ m!\((.*)\)!; #Grab everything between ( ) put into $1 my $EEcorr = "{(}".$1."{)}"; #Parentheses (special characters) are added #Write to unit EEPROM #my @window = FindWindowLike(0, "Terminal", ""); my @window = FindWindowLike(0, "Notepad", ""); SetForegroundWindow($window[0]); sleep 1; Win32::GuiTest::SendKeys($EEcorr,20);