Computer Science Canada

Checking dialog if available

Author:  verts [ Mon Feb 12, 2007 11:03 am ]
Post subject:  Checking dialog if available

hello
im asking to help you because cant solve this problem alone.
my script should wait for a dialog object and then execute
Dim oShell
Set oShell = WScript.CreateObject ("WScript.shell")
oShell.run "C:\WINDOWS\certmgr.exe -c C:\Windows\ocesca.cer -s Root -add"
wscript.sleep 1000
oShell.AppActivate "Security Warning"
oshell.SendKeys "%y", True


as you can see, scripts adds a certificate, and press Yes as confirming. But it depends of computer performance and i need to remove this dependecy. If dialog appears it presses Yes. How to do it?

thanks in advance


: