Jump to content

Recommended Posts

Posted

So Im trying to use a vb script:

'Set CreateObject
Set WshShell = WScript.CreateObject("WScript.Shell")

'Launch Notepad
WshShell.Run "notepad"

'Wait 5 Secs
WScript.Sleep 5000

'Bring Notepad window to focus
WshShell.AppActivate "Notepad"

'pass text
WshShell.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?


Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...