The only way I can think of doing this is to use the VB Script below where I run the batch file, wait a period of time (1000 for the moment) to allow connections to be made and then use SendKeys to pass Ctrl+P but it tells me a Object Required: WshShell
Any ideas how to send the key command once the application is active in the window?
Code: Select all
dim shell
set shell=createobject("wscript.shell")
shell.run "run.bat"
WScript.Sleep 1000
WshShell.SendKeys "^P" 'This is the problem bit
set shell=nothing