View Full Version : WshShell Script

10-31-2007, 12:01 AM
I'm trying to make a message box pop up to let a person know that there task is complete. Is there anyway to close a popup box with sendkeys?

Here's what I have so far

set WshShell = WScript.CreateObject("WScript.Shell")

WScript.Echo "Process Complete!"
WshShell.Sendkeys "{TAB}"
WScript.Sleep 100
WshShell.SendKeys "~"

The only thing is, it doesn't do anything. It doesn't hit enter to close the box, only once the box is closed is then enter is hit. Why, I don't have the foggiest.

Oh, and is there a "Windows Key" SendKeys equivalent?