Jump to content
Sign in to follow this  
UPSman2

mouse path

Recommended Posts

UPSman2

i really didn't know what to call this... its kinda pointless and very easy to make but i like it

instructions: just click on the green area (at different places) and then press run

CODE
#include <GUIConstantsEx.au3>

#include <StaticConstants.au3>

#include <WindowsConstants.au3>

#Include <GuiListView.au3>

$Form1 = GUICreate("point it", 620, 235, 193, 125)

$ListView1 = GUICtrlCreateListView("Point #|X|Y", 462, 0, 157, 204)

GUICtrlSendMsg(-1, 0x101E, 0, 50)

GUICtrlSendMsg(-1, 0x101E, 1, 40)

GUICtrlSendMsg(-1, 0x101E, 2, 40)

$Graphic1 = GUICtrlCreateGraphic(0, 0, 409, 232)

GUICtrlSetBkColor(-1, 0xC0DCC0)

$Button1 = GUICtrlCreateButton("Run", 549, 207, 63, 22, 0)

Opt("MouseCoordMode",2)

$lastx = 15

$lasty = 15

$count = 1

GUISetState(@SW_SHOW)

While 1

$nMsg = GUIGetMsg()

Switch $nMsg

Case $GUI_EVENT_CLOSE

Exit

Case $GUI_EVENT_PRIMARYDOWN

$a = MouseGetPos()

If $a[0] < 409 And $a[1] < 232 Then

GUICtrlSetGraphic ( $Graphic1, $GUI_GR_MOVE, $lastx, $lasty)

GUICtrlSetGraphic ( $Graphic1, $GUI_GR_LINE, $a[0], $a[1])

GUICtrlSetGraphic ( $Graphic1, $GUI_GR_DOT, $a[0], $a[1])

GUICtrlSetGraphic ( $Graphic1, $GUI_GR_REFRESH)

GUICtrlCreateListViewItem($count&"|"&$a[0]&"|"&$a[1], $ListView1)

$count+=1

$lastx = $a[0]

$lasty = $a[1]

EndIf

Case $Button1

$n = 0

MouseMove(15,15)

While 1

$x = _GUICtrlListView_GetItem($ListView1, $n, 1)

$y = _GUICtrlListView_GetItem($ListView1, $n, 2)

If $x[3] = "" And $y[3] = "" Then

ExitLoop

EndIf

MouseMove($x[3],$y[3])

$n +=1

WEnd

EndSwitch

WEnd

Share this post


Link to post
Share on other sites
monoceres

Pointless scripts are the funniest ones :P

I think it keeps your brain in shape :P


Broken link? PM me and I'll send you the file!

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.