durex Posted November 21, 2004 Posted November 21, 2004 So Im trying to use a vb script:'Set CreateObjectSet WshShell = WScript.CreateObject("WScript.Shell")'Launch NotepadWshShell.Run "notepad"'Wait 5 SecsWScript.Sleep 5000'Bring Notepad window to focusWshShell.AppActivate "Notepad"'pass textWshShell.SendKeys "Testing123"WshShell.SendKeys "{ENTER}"When I run the vbs script normally, it does what its supposed to- open Notepad, wait 5 secs, type "Testing123", then press Enter.When I try to run this from RunOnceEx, all it does is open notepad and doesnt pass the text... any ideas?
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now