Sign in to follow this  
Followers 0
AlmarM

Moving GUI :P

8 posts in this topic

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.

Share this post


Link to post
Share on other sites



:) its very flashy! but cool! :)

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

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! you’re the best in town Fight!

Share this post


Link to post
Share on other sites

Rambo...yours is really Nice :)!!!

Share this post


Link to post
Share on other sites

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:-)

Share this post


Link to post
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
Sign in to follow this  
Followers 0