Jump to content
Sign in to follow this  
FinalVersion

Anyone Made This?

Recommended Posts

AlmarM

You mean a program that lets you draw a region on the screen?

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
MrMitchell

Program lets you draw a square and returns left. top, right, bottom thanks.

What do you mean by "returns left, top, right, bottom?"

Share this post


Link to post
Share on other sites
AlmarM

I did some searches and found these 2 links:

http://www.autoitscript.com/forum/index.ph...;hl=Draw+Region

#70464

Hope I helped you!

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
Melba23

Godly,

Take a look at this crosshairs UDF. It both draws lines on the screen and gets mouse coords on a click. I realise it is long way from what you are looking for, but it could very well offer you some very good pointers on how to get there.

M23


Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind._______My UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Share this post


Link to post
Share on other sites
DrKovra

Try this .... and watch the console output of SciTE ... btw ... if you like minimize SciTE and play around the desktop .... the check console output ....

... OLD SCHOOL PROG-STYLE ! ... hope it's what you're looking for ... ^_^

#Include <Misc.au3>

$dll = DllOpen("user32.dll")
Opt("OnExitFunc", "endscript")
HotKeySet("{ESC}", "endscript")

Global $X0,$Y0,$X1,$Y1,$DOWN,$UP,$pos,$FIRST

$DOWN=False
$UP=False
$FIRST=False
$X0=-1
$Y0=-1
$X1=$X0
$Y1=$Y0

While 1
    Sleep ( 250 )
    _BoxMouse()
    
;YOUR CODE HERE !!!!
    
;
    


    
    
    
WEnd
Exit


Func _BoxMouse()
        $DOWN=False
    If _IsPressed("01", $dll) Then
        $DOWN=True
        If $FIRST=False Then
            $pos = MouseGetPos()
            $X0=$pos[0]
            $Y0=$pos[1]
            $FIRST=True
        ;FIRST TIME MOUSE BUTTON COMES DOWN (LEFT CLICK)!!!!
            
            
        EndIf

    ElseIf  $FIRST=True Then
        If $DOWN=False Then
            $UP=True
            $pos = MouseGetPos()
            $X1=$pos[0]
            $Y1=$pos[1]
            
            ConsoleWrite("Mouse x0,y0:" & $X0 & "," & $Y0 & "   x1,y1:" & $X1 & "," & $Y1 & @CRLF)
            
        ;MOUSE COMES FROM DOWN STATE TO UP STATE !!!!
            
        ; *********************
;~          ASSIGN HERE THE VALUES OF X0,Y0 AND X1,Y1 BEFORE RESETING THEM !!!!


        ;**********************
            
        ;RESET VALUE ...
            $DOWN=False
            $UP=False
            $FIRST=False
            $X0=-1
            $Y0=-1
            $X1=$X0
            $Y1=$Y0
        Else
            $UP=False
        EndIf   
    EndIf
    
EndFunc


Func endscript()
    DllClose($dll)
    ConsoleWrite("APP closed OK!" & @CRLF)
    Exit
EndFunc

[s][font="Impact"]░▒▓▓►DrKovra◄▓▓▒░[/font][/s]The only thing I [sup]know [/sup]is that I don't know [sub]nothing[/sub]--------------- __________------------------------------ __________---------------

Share this post


Link to post
Share on other sites
FinalVersion

Try this .... and watch the console output of SciTE ... btw ... if you like minimize SciTE and play around the desktop .... the check console output ....

... OLD SCHOOL PROG-STYLE ! ... hope it's what you're looking for ... ^_^

#Include <Misc.au3>

$dll = DllOpen("user32.dll")
Opt("OnExitFunc", "endscript")
HotKeySet("{ESC}", "endscript")

Global $X0,$Y0,$X1,$Y1,$DOWN,$UP,$pos,$FIRST

$DOWN=False
$UP=False
$FIRST=False
$X0=-1
$Y0=-1
$X1=$X0
$Y1=$Y0

While 1
    Sleep ( 250 )
    _BoxMouse()
    
;YOUR CODE HERE !!!!
    
;
    


    
    
    
WEnd
Exit


Func _BoxMouse()
        $DOWN=False
    If _IsPressed("01", $dll) Then
        $DOWN=True
        If $FIRST=False Then
            $pos = MouseGetPos()
            $X0=$pos[0]
            $Y0=$pos[1]
            $FIRST=True
    ;FIRST TIME MOUSE BUTTON COMES DOWN (LEFT CLICK)!!!!
            
            
        EndIf

    ElseIf  $FIRST=True Then
        If $DOWN=False Then
            $UP=True
            $pos = MouseGetPos()
            $X1=$pos[0]
            $Y1=$pos[1]
            
            ConsoleWrite("Mouse x0,y0:" & $X0 & "," & $Y0 & "   x1,y1:" & $X1 & "," & $Y1 & @CRLF)
            
    ;MOUSE COMES FROM DOWN STATE TO UP STATE !!!!
            
    ; *********************
;~          ASSIGN HERE THE VALUES OF X0,Y0 AND X1,Y1 BEFORE RESETING THEM !!!!


    ;**********************
            
    ;RESET VALUE ...
            $DOWN=False
            $UP=False
            $FIRST=False
            $X0=-1
            $Y0=-1
            $X1=$X0
            $Y1=$Y0
        Else
            $UP=False
        EndIf   
    EndIf
    
EndFunc


Func endscript()
    DllClose($dll)
    ConsoleWrite("APP closed OK!" & @CRLF)
    Exit
EndFunc
Exactly what I'm looking for thanks!

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  

×