Avatar of Dooglave

asked on 

Is there a way to detect as soon as a dialoug window opens with vbs

Is there a way to tell exactly when this program is open rather than sleep and hope it's open?

Dim WshShell, ret
Set WshShell = Wscript.CreateObject("WScript.Shell")
WshShell.Run "uninstall.exe"
Wscript.Sleep 20000
ret = WshShell.AppActivate("Program")
If ret = False then
 Msgbox "Uninstall Failed Error Code: 0"
End If
 WshShell.SendKeys "{ENTER}"

Open in new window

Visual Basic ClassicVB Script

Avatar of undefined
Last Comment

8/22/2022 - Mon