I have a couple of scripts. Evertime there is an Input box, it always pops up on my main monitor (center) I would like to move it to my Right side monitor.
Any ideas?
thanks in advance, you all sexy AHK coders.
Moving MSGBOX to different monitor.
Re: Moving MSGBOX to different monitor.
Your title says "MSGBOX" but your post says "Input box". If it's an InputBox, it's very easy to have it appear exactly where you want by specifying the x and y coordinates in the InputBox command:
InputBox, OutputVar , Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default
A MsgBox can also be moved, although not as straightforward, but I can show you if you need to move a MsgBox as well.
InputBox, OutputVar , Title, Prompt, HIDE, Width, Height, X, Y, Font, Timeout, Default
A MsgBox can also be moved, although not as straightforward, but I can show you if you need to move a MsgBox as well.
Re: Moving MSGBOX to different monitor.
Here is a method for moving a MsgBox:
It creates a second thread via SetTimer that will act after MsgBox appears. You can't simply put the WinMove immediately after the MsgBox command because it won't get to that line until the MsgBox is dismissed.
Code: Select all
SetTimer, MoveMsgBox, -50
MsgBox, I have been moved to 0,0
return
MoveMsgBox:
WinWait, ahk_class #32770 ahk_exe AutoHotkey.exe
WinMove, ahk_class #32770 ahk_exe AutoHotkey.exe,, 0, 0
return
Who is online
Users browsing this forum: b0dhimind, Bing [Bot], downstairs, Ram and 42 guests