Jump to content

Msgbox Q


Guest aryanez
 Share

Recommended Posts

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... :whistle:

Stupid suggestion...

Link to comment
Share on other sites

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

AutoIt3, the MACGYVER Pocket Knife for computers.

Link to comment
Share on other sites

OR you could something ever better then on ScriptKitty's example :whistle:

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...