August 20, 200718 yr Set WshShell = WScript.CreateObject("WScript.Shell") WshShell.AppActivate "WindowName" 'Replace WindowName with the name of your window WScript.Sleep 1000'wait WshShell.SendKeys "sendthis{Enter}" saved as .vbs I don't suggest this unless the is no alternative. (almost always another way.) a user can steal the focus from the script, Is very hard to capture errors. The sendkey command should only be used as a last resort. Having said that I have used it with some success. Depending on the enviroment it is running in and a important the script is, you can add alot to the script that can make it run more reliably but I have never done this and made it run flawlessly. (If I'm the only one running it, no problem)
August 21, 200718 yr Author thanks for your help this however looks a bit complicated for my limited knowledge in scripting
October 12, 200718 yr try autoit version 3, it is a very simple basic like, there is a very big forum were you can find what you want, also it is possible to compile the script you have done.
Create an account or sign in to comment