Jump to content

Opening a Msgbox and the automatically closing it


cb12
 Share

Recommended Posts

I would like to warn the user that a script is going to be run so they can leave the PC to do its thing. However if the user isn't there I would like the script to run anyway so I want the message to pop up and the if its still there in 10 seconds I want the enter button to be pressed and the window closed. In the code below the send enter line is not working as expected. I would like to use autoIT built in commands instead of gui's for this

My code is as follows:

MsgBox(0, "sample title", "sample text")

WinActivate("[CLASS:#32770]")

Sleep(10000)

Send("{ENTER}")

WinWaitClose("[CLASS:#32770]")

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...