AlmarM Posted February 9, 2008 Posted February 9, 2008 I was a bit bored, so I made this MOVING GUI #include <GUIConstants.au3> HotKeySet("{ESC}", "_Exit") While 1 $nMsg = GUIGetMsg() $pos = MouseGetPos() $GUI = GUICreate("Moving GUI", 100, 100, $pos[0], $pos[1]) GUISetState() Sleep(10) GUIDelete($GUI) Select Case $nMsg = $GUI_EVENT_CLOSE _Exit() EndSelect WEnd Func _Exit() Exit EndFunc Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
AlmarM Posted February 9, 2008 Author Posted February 9, 2008 (edited) I know its flashy, because the GUIDelete($GUI) EDIT: I used GUISetCoord() but look what happens ;P #include <GUIConstants.au3> HotKeySet("{ESC}", "_Exit") While 1 $nMsg = GUIGetMsg() $pos = MouseGetPos() $GUI = GUICreate("Moving GUI", 100, 100, $pos[0], $pos[1]) GUISetState() Sleep(10) GUISetCoord($pos[0], $pos[1], "", "", $GUI) Select Case $nMsg = $GUI_EVENT_CLOSE _Exit() EndSelect WEnd Func _Exit() Exit EndFunc Edited February 9, 2008 by AlmarM Minesweeper A minesweeper game created in autoit, source available. _Mouse_UDF An UDF for registering functions to mouse events, made in pure autoit. 2D Hitbox Editor A 2D hitbox editor for quick creation of 2D sphere and rectangle hitboxes.
James Posted February 9, 2008 Posted February 9, 2008 Why wuld you need the GuiDelete? Why not GuiSetPos? Blog - Seriously epic web hosting - Twitter - GitHub - Cachet HQ
rambo3889 Posted February 9, 2008 Posted February 9, 2008 Updating the win positions without checking if they are the same, i changed it to this and it doesn't flicker anymore but not quite sury if it more or less effective #include <GUIConstants.au3> HotKeySet("{ESC}", "_Exit") $pos = MouseGetPos() Global $OLDX = $pos[0], $OLDY = $pos[1] $GUI = GUICreate("Moving GUI", 100, 100, $pos[0], $pos[1]) GUISetState() While 1 $nMsg = GUIGetMsg() $pos = MouseGetPos() If $pos[0] <> $OLDX And $pos[1] <> $OLDY Then WinMove($GUI, "", $pos[0], $pos[1]) GUISetState() $OLDX = $pos[0] $OLDY = $pos[1] EndIf Sleep(10) Select Case $nMsg = $GUI_EVENT_CLOSE _Exit() EndSelect WEnd Func _Exit() Exit EndFunc ;==>_Exit My Scripts:Radioblog Club Music DownloaderOther stuff:Fun movieIm serious read the help file it helps :PFight 'Till you drop. Never stop, You Cant give up. Til you reach the top Fight! youre the best in town Fight!
crzftx Posted February 10, 2008 Posted February 10, 2008 personally I wouldn't worry about checking if they are the same, just for simplicity. HotKeySet("{ESC}", "_Exit") $GUI = GUICreate("Moving GUI", 100, 100, -200, -200) GUISetState() While 1 If GUIGetMsg() = -3 Then Exit WinMove($GUI,"",MouseGetPos(0),MouseGetPos(1)) Sleep(10) WEnd Func _Exit() Exit EndFunc
JRSmile Posted February 11, 2008 Posted February 11, 2008 what about this? #include <GUIConstants.au3> HotKeySet("{ESC}", "_Exit") $GUI = GUICreate("Moving GUI", 100, 100, -1, -1, Default ,$WS_EX_TOPMOST) GUISetState() While 1 $nMsg = GUIGetMsg() $pos = MouseGetPos() WinMove("Moving GUI", "", $pos[0]+1, $pos[1]+1) Select Case $nMsg = $GUI_EVENT_CLOSE _Exit() EndSelect WEnd Func _Exit() Exit EndFunc $a=StringSplit("547275737420796F757220546563686E6F6C75737421","") For $b=1 To UBound($a)+(-1*-1*-1)step(2^4/8);&$b+=1*2/40*µ&Asc(4) Assign("c",Eval("c")&Chr(Dec($a[$b]&$a[$b+1])));''Chr("a")&"HI" Next ;time_U&r34d,ths,U-may=get$the&c.l.u.e;b3st-regards,JRSmile; MsgBox(0x000000,"",Eval("c"));PiEs:d0nt+*b3.s4d.4ft3r.1st-try:-)
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