Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Simple Scripting Problem 1

Status
Not open for further replies.
This is a bit messy. You need to know the title of the dialog that pops up. Add the following VBScript after the process command. Put it in a .vbs file and run it using cscript You will need to change the window title.
Code:
const WINDOW_TITLE = "Confirm"
Dim WSHShell
Dim success
Dim activated

Set WSHShell = CreateObject("WScript.Shell")
waiting = vbTrue

While waiting
   WScript.Sleep 50
   activated = WSHShell.AppActivate(WINDOW_TITLE)

   While Not activated
      Wscript.Sleep 10
      activated = WSHShell.AppActivate(WINDOW_TITLE)
   Wend

   WSHShell.SendKeys(KEYS_TO_SEND)
   WScript.Sleep 50
   waiting = WSHShell.AppActivate(WINDOW_TITLE)
Wend
Set WshShell = Nothing
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top