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?


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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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