twinnis Posted March 1, 2006 Share Posted March 1, 2006 Hi. MsgBoxes always are centrated on the screen. Is there a way to move it like inputboxes? I want the MsgBox to pause the script for the user to click OK when the user is finished with the underlying program. But the MsgBox covers parts of the underlying program. /Twinnis Link to comment Share on other sites More sharing options...
BigDod Posted March 1, 2006 Share Posted March 1, 2006 According to the help file message boxes are always centred. You can always make your own one using SplashTextOn and you can place it anywhere on the screen. Or you can make your own GUI. Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
twinnis Posted March 1, 2006 Author Share Posted March 1, 2006 According to the help file message boxes are always centred. You can always make your own one using SplashTextOn and you can place it anywhere on the screen. Or you can make your own GUI.Yes I know, but i thought that there might be a workaround or nifty tip, because I am a bit lazy... But its time for me to learn to make GUIs.Thanks for answer BigDod./Twinnis Link to comment Share on other sites More sharing options...
BigDod Posted March 1, 2006 Share Posted March 1, 2006 (edited) Yes I know, but i thought that there might be a workaround or nifty tip, because I am a bit lazy... But its time for me to learn to make GUIs.Thanks for answer BigDod./TwinnisThere is a very useful tool for making GUI's called Koda. It is available with Scite or can be downloaded separately.Edit - You can download it at http://www.autoitscript.com/fileman/users/lookfar/index.html Edited March 1, 2006 by BigDod Time you enjoyed wasting is not wasted time ......T.S. Elliot Suspense is worse than disappointment................Robert Burns God help the man who won't help himself, because no-one else will...........My Grandmother Link to comment Share on other sites More sharing options...
Helge Posted March 1, 2006 Share Posted March 1, 2006 (edited) Updated....works for both uncompiled and compiled scripts. Put _DoTheMove() in the start, and _MoveMsgBox right before the MsgBoxes you want to move. _DoTheMove() _MoveMsgBox("MsgBox Title", 0, 100) MsgBox(64, "MsgBox Title", "MsgBox Text") Func _DoTheMove() If $CMDLine[0] = 4 AND $CMDLine[1] = "-move" Then Opt("WinWaitDelay", 0) WinWait($CMDLine[2]) WinMove($CMDLine[2], "", $CMDLine[3], $CMDLine[4]) Exit EndIf EndFunc Func _MoveMsgBox($sTitle, $iPosX, $iPosY) If @Compiled Then Run('"' & @ScriptFullPath & '" -move "' & $sTitle & '" ' & $iPosX & " " & $iPosY) Else Run('"' & @AutoItExe & '" "' & @ScriptFullPath & '" -move "' & $sTitle & '" ' & $iPosX & " " & $iPosY) EndIf EndFunc Edited March 8, 2006 by Helge SkysLastChance 1 Link to comment Share on other sites More sharing options...
herewasplato Posted March 1, 2006 Share Posted March 1, 2006 (edited) ...but small modifications would make it work as uncompiled.; Move Message Box ; Author - herewasplato _MoveMsgBox(0, "testTitle", "testText", 0, 10) Func _MoveMsgBox($MBFlag, $MBTitle, $MBText, $x, $y) Local $file = FileOpen(EnvGet("temp") & "\MoveMB.au3", 2) If $file = -1 Then Return;if error, give up on the move Local $line1 = 'AutoItSetOption(' & '"WinWaitDelay", 0' & ')' Local $line2 = 'WinWait("' & $MBTitle & '", "' & $MBText & '")' Local $line3 = 'WinMove("' & $MBTitle & '", "' & $MBText & '"' & ', ' & $x & ', ' & $y & ')' FileWrite($file, $line1 & @CRLF & $line2 & @CRLF & $line3) FileClose($file) Run(@AutoItExe & " /AutoIt3ExecuteScript " & EnvGet("temp") & "\MoveMB.au3") MsgBox($MBFlag, $MBTitle, $MBText) FileDelete(EnvGet("temp") & "\MoveMB.au3") EndFunc;==>_MoveMsgBoxEdit: requires beta Edit2: An updated version of this code can be found here: http://www.autoitscript.com/forum/index.ph...showtopic=22531 Edited March 4, 2006 by herewasplato [size="1"][font="Arial"].[u].[/u][/font][/size] 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