deadserious Posted April 9, 2008 Share Posted April 9, 2008 Hey Everyone, I have an issue maybe someone can assist with this. I created a script to remotely shutdown a group of computers, the script has an option to abort the shutdown, however the popup message goes behind the message stating that the computer is shutting down. Is there a way to move the message box to the top corner of a screen and make it active? I tried this with notepad, I just can't seem to figure out how to do it with the message box that comes up in the script. Here is the script for notepad ************************************************************************ Run("notepad") Sleep(500) WinMove("Untitled - Notepad", "", 20, 20,) ************************************************************************ This is the script to shutdown the computer ************************************************************************ ; Prompt user to run the script - use a Yes/No prompt $answer=MsgBox(4, " Abort the Shutdown?", "Click Yes to abort the shutdown process.") WinMove("MsgBox 4", "", ,20, 20) ; Check User's answer ; If "No" was selected click (7) then exit the script if $answer=7 Then MsgBox(0, "Do you want to Abort the Shutdown?", "Computer will continue to shutdown") Exit EndIf Run("c:\windows\system32\psshutdown -a") ********************************************************************* Any Assistance is greatly appreciated. Deadserious Link to comment Share on other sites More sharing options...
Achilles Posted April 9, 2008 Share Posted April 9, 2008 (edited) And you might want to also try the WinActivate function in the helpfile. Edit: The msgbox function pauses the script until the user enters data... You could create your own GUI. Other people might suggest using a separate script to move the msgbox but that only works if the computers you are using have AutoIt (I think...) Edited April 9, 2008 by Achilles My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list] Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now