Guest aryanez Posted March 19, 2004 Share Posted March 19, 2004 Is there a way to define the location of a msgbox? Link to comment Share on other sites More sharing options...
Helge Posted March 19, 2004 Share Posted March 19, 2004 You could have used InputBox instead of MsgBox, but it wouldn't be the same though... Though if you choose InputBox you get a "Ok/Cancel"-option plus that you can define the positioning... Yeah... I know... Stupid suggestion... Link to comment Share on other sites More sharing options...
w_sp8er Posted March 19, 2004 Share Posted March 19, 2004 (edited) Or you could do this: MsgBox(0,"title","text") WinWaitActive("title","text") WinMove("title","text",100, 100) create the 'MsgBox' & then 'Move' it. Edited March 19, 2004 by w_sp8er Link to comment Share on other sites More sharing options...
scriptkitty Posted March 19, 2004 Share Posted March 19, 2004 (edited) This won't work, as AutoIt will not do anything until you close the MSGbox Not even Adlib functions. MsgBox(0,"title","text") WinWaitActive("title","text") WinMove("title","text",100, 100)You can however have the script write an autoit script, or copy out a premade autoit compiled exe and run that to move your box. such as: FileInstall ( "/temp/mymover.exe", "mymove.exe") ; some script run("mymove.exe "&$title &" "& $text &" " & $locx&" "&$locy) MsgBox(0,"title","text") ; end of script filedelete("mymove.exe") ;mymover.au3 before compile if $cmdline[0]=4 then winwaitactive($cmdline[1],$cmdline[2]) WinMove($cmdline[1],$cmdline[2],$cmdline[3],$cmdline[4]) endif Not tested, but you get the idea. Edited March 19, 2004 by scriptkitty AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Valik Posted March 19, 2004 Share Posted March 19, 2004 Given that a message box can be moved by the user, anyway, what's the point in making it appear in a certain place to begin with? Link to comment Share on other sites More sharing options...
scriptkitty Posted March 19, 2004 Share Posted March 19, 2004 Same could be asked why inputbox has location.... AutoIt3, the MACGYVER Pocket Knife for computers. Link to comment Share on other sites More sharing options...
Helge Posted March 19, 2004 Share Posted March 19, 2004 OR you could something ever better then on ScriptKitty's example In my example you just need one single file : If $CmdLine[0] = 1 AND $CmdLine[1] = "move" Then Sleep(10) WinWaitActive("MsgBox title") WinMove ("MsgBox title", "", 100, 100) Exit Else ;Continue.. EndIf Run("MyScript.exe " & "move") MsgBox(64, "MsgBox title", "This window will be moved to the upper left corner..") Exit I've tested it, and it works ! Though you can see the standard position a little time.. Link to comment Share on other sites More sharing options...
Wallfire Posted March 19, 2004 Share Posted March 19, 2004 isnt there a textbox that can be defined to a specic location? would that work inplace of a message box? :cheer: awww...wheres the chick? Link to comment Share on other sites More sharing options...
scriptkitty Posted March 19, 2004 Share Posted March 19, 2004 You could use imputbox and just remove the imput box with the external program. ; hide inputbox.au3 ; hides the Edit1 control on box starting with _e_ and removes the _e_ WinWait("_e_") ControlHide ( "_e_", "", "Edit1" ) $x=WinGetTitle ( "_e_") WinSetTitle("_e_","",StringTrimLeft($x,3)) No commandline, and you can call out all your size and location in inputbox() AutoIt3, the MACGYVER Pocket Knife for computers. 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