Jump to content
Sign in to follow this  

Move A Message Box

Recommended Posts


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




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")



Run("c:\windows\system32\psshutdown -a")


Any Assistance is greatly appreciated.


Share this post

Link to post
Share on other sites

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 by Achilles

My Programs[list][*]Knight Media Player[*]Multiple Desktops[*]Daily Comics[*]Journal[/list]

Share this post

Link to post
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
Sign in to follow this