I have a mobile connection software, which always asks for confirmation when going into roaming state. Every day it requires to press "OK" before it can connect.
I found the following script that i tried to use to auto-accept that pop-up window:
Set WshShell = WScript.CreateObject("WScript.Shell") 'Check if the Hardware installation window is present, else sleep 1 second and try again. present = 0 Do Until present = 1 If WshShell.AppActivate("Hardware Installation") Then present = 1 Else WScript.Sleep 1000 End If Loop 'Make the Hardware Installation window active WshShell.AppActivate "Hardware Installation" 'Send Alt+C WshShell.SendKeys "%C"
Script above doesn't work directly in my situation:
The pop-up window, and the software itself both have the same name in the window (ie. "ABC Software). So i can't identify the pop-up with WshShell.AppActivate
In the roaming pop-up question window there are only OK and CANCEL buttons. I can't use ALT+C
Can i make the script reads the message the pop-up contains, and identity the window with that?
Any ideas how i could proceed?
I could auto-accept the pop-up just by using sendkeys SPACE ?