You can use scripting to achieve some of this - use WSH to create a
WshScriptExec object, with access to StdIn and StdOut streams. I've never really
tried using this though, and it might be a bit complicated.

Another, possibly easier way, would be to use SendKeys(). Something like this:


var WshShell = new ActiveXObject("WScript.Shell");
WshShell.Run("calc");
Sleep(100);
WshShell.AppActivate("Calculator");
Sleep(100);
WshShell.SendKeys ("1{+}");
Sleep(500);
WshShell.SendKeys("2");
Sleep(500);
WshShell.SendKeys("~");
Sleep(500);
WshShell.SendKeys("*3");
Sleep(500);
WshShell.SendKeys("~");
Sleep(2500);


Of course, matching the title bar to the window is not an exact science, but it
might do an ok job.

-- 
<http://forum.pspad.com/read.php?2,42667,42717>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem