Jump to content

Mouse2Key v1.0


bigassmuffin
 Share

Recommended Posts

it is finnaly time to start repaying the friendly community of autoit forums;

So heres ym first program Im putting on here (and Im almsot done with v 2.0 already)

This program replaces the mouse with the kayboard, and is user defined to of which keys do what function such as clicking and moving the mouse.

#cs ----------------------------------------------------------------------------

 AutoIt Version: 3.1.1.0
 Author:         BigAssMuffin

 Script Function:
    Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here


HotKeySet("{ESC}", "quit")

$game = 0




#include <GUIConstants.au3>
; == GUI generated with Koda ==
$dlgTabbed = GUICreate("Mouse2Key - Bigassmuffin", 490, 416, 244, 119)
GUISetIcon("D:\005.ico")
$Button_1 = GUICtrlCreateButton("&Start", 398, 376, 75, 25)
$Button_2 = GUICtrlCreateButton("&Exit", 310, 376, 75, 25)
$Tab1 = GUICtrlCreateTab(8, 8, 473, 353)
$TabSheet1 = GUICtrlCreateTabItem("Settings")
GUICtrlCreateLabel("Move Mouse Left", 24, 184, 87, 17)
GUICtrlCreateLabel("Move Mouse Right", 344, 184, 94, 17)
GUICtrlCreateLabel("Move Mouse Up", 192, 72, 83, 17)
GUICtrlCreateLabel("Move Mouse Down", 192, 296, 97, 17)
GUICtrlCreateLabel("Move Mouse Up-Right", 344, 72, 111, 17)
GUICtrlCreateLabel("Move Mouse Down-Right", 344, 296, 125, 17)
GUICtrlCreateLabel("Move Mouse Down-Left", 24, 296, 118, 17)
GUICtrlCreateLabel("Move Mouse Up-Left", 24, 72, 104, 17)
$Input_1 = GUICtrlCreateInput("{NUMPAD7}", 24, 48, 105, 21, -1, $WS_EX_CLIENTEDGE) ; top left
$Input_2 = GUICtrlCreateInput("{NUMPAD4}", 24, 160, 105, 21, -1, $WS_EX_CLIENTEDGE) ; left
$Input_3 = GUICtrlCreateInput("{NUMPAD1}", 24, 272, 105, 21, -1, $WS_EX_CLIENTEDGE) ; bottom left
$Input_4 = GUICtrlCreateInput("{NUMPAD8}", 192, 48, 105, 21, -1, $WS_EX_CLIENTEDGE) ; top
$Input_5 = GUICtrlCreateInput("{NUMPAD2}", 192, 272, 105, 21, -1, $WS_EX_CLIENTEDGE) ; bottom
$Input_6 = GUICtrlCreateInput("{NUMPAD9}", 344, 48, 105, 21, -1, $WS_EX_CLIENTEDGE) ; top right
$Input_7 = GUICtrlCreateInput("{NUMPAD6}", 344, 160, 105, 21, -1, $WS_EX_CLIENTEDGE) ; right
$Input_8 = GUICtrlCreateInput("{NUMPAD3}", 344, 272, 105, 21, -1, $WS_EX_CLIENTEDGE) ; bottom right
$Button3 = GUICtrlCreateButton("Mouse", 144, 88, 185, 177)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button2 = GUICtrlCreateButton("Left Click", 144, 88, 89, 81)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button1 = GUICtrlCreateButton("Right Click", 240, 88, 89, 81)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateLabel("Sensitivity:", 24, 328, 54, 17)
$Input_9 = GUICtrlCreateInput("70", 80, 328, 49, 21, -1, $WS_EX_CLIENTEDGE)
$Input_10 = GUICtrlCreateInput("{NUMPAD5}", 144, 136, 89, 21, -1, $WS_EX_CLIENTEDGE) ; left click
$Input_11 = GUICtrlCreateInput("{NUMPADADD}", 240, 136, 89, 21, -1, $WS_EX_CLIENTEDGE) ; right click
$TabSheet2 = GUICtrlCreateTabItem("Keys")
$Edit1 = GUICtrlCreateEdit("", 24, 48, 209, 289, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetData($Edit1, "{NUMPAD0} = Number Pad 0"&@CRLF&"{NUMPAD1} = Number Pad 1"&@CRLF&"{NUMPAD2} = Number Pad 2"&@CRLF&"{NUMPAD3} = Number Pad 3"&@CRLF&"{NUMPAD4} = Number Pad 4"&@CRLF&"{NUMPAD5} = Number Pad 5"&@CRLF&"{NUMPAD6} = Number Pad 6"&@CRLF&"{NUMPAD7} = Number Pad 7"&@CRLF&"{NUMPAD8} = Number Pad 8"&@CRLF&"{NUMPAD9} = Number Pad 9"&@CRLF&""&@CRLF&"{NUMPADMULT} = Number Pad Multiply"&@CRLF&"{NUMPADADD} = Number Pad Add"&@CRLF&"{NUMPADSUB} = Number Pad Subtract"&@CRLF&"{NUMPADDIV} = Number Pad Divide"&@CRLF&"{NUMPADDOT} = Number Pad Period"&@CRLF&"{NUMPADENTER} Number Pad Enter"&@CRLF&""&@CRLF&"{F1} = F1"&@CRLF&"{F2} = F2"&@CRLF&"{F3} = F3"&@CRLF&"{F4} = F4"&@CRLF&"{F5} = F5"&@CRLF&"{F6} = F6"&@CRLF&"{F7} = F7"&@CRLF&"{F8} = F8"&@CRLF&"{F9} = F9"&@CRLF&""&@CRLF&"a = a"&@CRLF&"b = b"&@CRLF&"c = c"&@CRLF&"d = d"&@CRLF&"e = e"&@CRLF&"f = f"&@CRLF&"g = g"&@CRLF&"h = h"&@CRLF&"i = i"&@CRLF&"j = j"&@CRLF&"k = k"&@CRLF&"l = l"&@CRLF&"m = m"&@CRLF&"n = n"&@CRLF&"o = o"&@CRLF&"p = p"&@CRLF&"q = q"&@CRLF&"r = r"&@CRLF&"s = s"&@CRLF&"t = t"&@CRLF&"u = u"&@CRLF&"v = v"&@CRLF&"w = w"&@CRLF&"x = x"&@CRLF&"y = y"&@CRLF&"z = z"&@CRLF&""&@CRLF&"{ALT} = Alt"&@CRLF&"{LALT} = Left Alt Key"&@CRLF&"{RALT} = Right Alt Key"&@CRLF&"{LCTRL} = Left Control Key"&@CRLF&"{RCTRL} = Right Control Key"&@CRLF&"{LSHIFT} = Left Shift Key"&@CRLF&"{RSHIFT} = Right Shift Key"&@CRLF&""&@CRLF&"{!} = !"&@CRLF&"{#} = #"&@CRLF&"{+} = +"&@CRLF&"{^} = ^"&@CRLF&"{{} = {"&@CRLF&"{}} = }"&@CRLF&"{SPACE} = Space"&@CRLF&"{ENTER} = Enter"&@CRLF&"{ALT} = Alt"&@CRLF&"{BACKSPACE} or {BS} = Backspace"&@CRLF&"{DELETE} or {DEL} = Delete"&@CRLF&"{UP} = Up Arrow"&@CRLF&"{RIGHT} = Right Arrow"&@CRLF&"{DOWN} = Down Arrow"&@CRLF&"{LEFT} = Left Arrow"&@CRLF&"{HOME} = Home"&@CRLF&"{END} = End"&@CRLF&"{INSERT} or {INS} = Insert"&@CRLF&"{PGUP} = Page Up"&@CRLF&"{PGDN} = Page Down"&@CRLF&"{TAB} = Tab"&@CRLF&"{PRINTSCREEN} = Print Screen"&@CRLF&"{PAUSE} = Pause"&@CRLF&"{BREAK} = Break")
GUICtrlCreateLabel("The left column is the code, and the right column is the key.  Simply copy and paste the code into the Settings page.", 250, 48, 209, 289)
$TabSheet3 = GUICtrlCreateTabItem("Help")
GUICtrlSetState(-1,$GUI_SHOW)
GUICtrlCreateLabel("How to set keys?", 16, 40, 102, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("First, go to the Keys tab and find the keys you want to use from the left collumn.  Then, copy"&@CRLF&"and paste the code on the right collumn that matches your key and paste it in the Settings tab"&@CRLF&"under your desire mouse function.", 16, 56, 1099, 47)
GUICtrlCreateLabel("What is the Sensitivity Input Box?", 16, 112, 196, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("The sensitivity input box shows how much the mouse will move with a single press of the button."&@CRLF&"The higher you set it, the more sensitive it will be.", 16, 128, 745, 37)
GUICtrlCreateLabel("Why won't it work?", 16, 168, 112, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Make sure you have the { and } key around the code,  unless its a letter.", 16, 184, 345, 17)
$TabSheet4 = GUICtrlCreateTabItem("About")
GUICtrlCreateLabel("Mouse2Key stands for: Mouse to Keyboard.  This program sets mouse clicks and movement"&@CRLF&"to keypresses.  These keypresses are defined by YOU!" &@crlf& "This program was made by:" &@CRLF&@CRLF&"Bigassmuffin", 32, 48, 1480, 87)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)







While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            quit()
        Case $msg = $Button_1
            Play()
        Case $msg = $Button_2
            quit()
        Case Else
            ;;;;;;;
        EndSelect
    If $game = 1 Then
        While 1
            HotKeySet( GuiCtrlRead($Input_4),"up")
            HotKeySet( GuiCtrlRead($Input_5),"down")
            HotKeySet( GuiCtrlRead($Input_2),"left")
            HotKeySet( GuiCtrlRead($Input_7),"right")
            HotKeySet( GuiCtrlRead($Input_1),"upleft")
            HotKeySet( GuiCtrlRead($Input_3),"downleft")
            HotKeySet( GuiCtrlRead($Input_6), "upright")
            HotKeySet( GuiCtrlRead($Input_8), "downright")
            HotKeySet( GuiCtrlRead($Input_10),"click")
            HotKeySet( GuiCtrlRead($Input_11),"rclick")
        WEnd

        func up()
        local $array = MouseGetPos()
            local $x = $array[0]
            local $y = $array[1] - GuiCtrlRead($Input_9)
            mousemove($x,$y,2)
        endfunc

        func down()
            local $array = MouseGetPos()
            local $x = $array[0]
            local $y = $array[1] + GuiCtrlRead($Input_9)
            mousemove($x,$y,2)
        EndFunc

        func left()
            local $array = MouseGetPos()
            local $x = $array[0] - GuiCtrlRead($Input_9)
            local $y = $array[1]
            mousemove($x,$y,2)
        EndFunc

        func right()
            local $array = MouseGetPos()
            local $x = $array[0] + GuiCtrlRead($Input_9)
            local $y = $array[1]
            mousemove($x,$y,2)
        endfunc


        func upleft()
        local $array = MouseGetPos()
            local $x = $array[0] - GuiCtrlRead($Input_9)
            local $y = $array[1] - GuiCtrlRead($Input_9)
            mousemove($x,$y,2)
        endfunc

        func downleft()
            local $array = MouseGetPos()
            local $x = $array[0] - GuiCtrlRead($Input_9)
            local $y = $array[1] + GuiCtrlRead($Input_9)
            mousemove($x,$y,2)
        EndFunc

        func upright()
        local $array = MouseGetPos()
            local $x = $array[0] + GuiCtrlRead($Input_9)
            local $y = $array[1] - GuiCtrlRead($Input_9)
            mousemove($x,$y,2)
        endfunc

        func downright()
        local $array = MouseGetPos()
            local $x = $array[0] + GuiCtrlRead($Input_9)
            local $y = $array[1] + GuiCtrlRead($Input_9)
            mousemove($x,$y,2)
        endfunc


        func click()
            mouseclick("left")
        EndFunc

        Func rclick()
            mouseclick("right")
        EndFunc
    EndIf
WEnd

Exit







Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc



Func quit()
    Exit
EndFunc

V2.0:

~Different sensitivity for different movements

~Multiple keys for one movement or mouse click

~Accelleration (gains speed if holding down)

(I already completed the first ot parts of the v2.0, any help with acelleration would be appreciated. I know I have to make it so it says such as Input_9 + 15 but there has to be aline before that such as Wait(3000) or soemthing?..waits not a command thoguh, and sleep command will pause script for 3 seconds so that doesnt work either)

Appreciate ANY feeback!!! Thanks for all your help in the past!

Edited by bigassmuffin
Link to comment
Share on other sites

had to modify it a lil to get it working but excellent job!

a suggestion i have:

when holding the button, once u let go it keeps going because of how long u held it down, i want it to stop when u release the key

ALright, thanks for the feeback, jsut curious, what did you ahve to modify?

And Ive noticed that problem for awhile where it trails, possibly it can be fixed with a simle Sleep command, like Sleep(250) or somehintg, ill try it out and see if it works.

EDIT~Nope, didnt work~EDIT

Maybe Ill try putting If commands outside each func that moves the mouse, so only ONE can play at a time, then i put sleep command in there

Edit~ Didnt work either, I prob messed up on if statements, lol ;P ~ Edit

Edited by bigassmuffin
Link to comment
Share on other sites

It has to be changed a little to work. I also ran Tidy on it

#cs ----------------------------------------------------------------------------
    
    AutoIt Version: 3.1.1.0
    Author:         BigAssMuffin
    
    Script Function:
    Template AutoIt script.
    
#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here


HotKeySet("{ESC}", "quit")

$game = 0




#include <GUIConstants.au3>
; == GUI generated with Koda ==
$dlgTabbed = GUICreate("Mouse2Key - Bigassmuffin", 490, 416, 244, 119)
GUISetIcon("D:\005.ico")
$Button_1 = GUICtrlCreateButton("&Start", 398, 376, 75, 25)
$Button_2 = GUICtrlCreateButton("&Exit", 310, 376, 75, 25)
$Tab1 = GUICtrlCreateTab(8, 8, 473, 353)
$TabSheet1 = GUICtrlCreateTabItem("Settings")
GUICtrlCreateLabel("Move Mouse Left", 24, 184, 87, 17)
GUICtrlCreateLabel("Move Mouse Right", 344, 184, 94, 17)
GUICtrlCreateLabel("Move Mouse Up", 192, 72, 83, 17)
GUICtrlCreateLabel("Move Mouse Down", 192, 296, 97, 17)
GUICtrlCreateLabel("Move Mouse Up-Right", 344, 72, 111, 17)
GUICtrlCreateLabel("Move Mouse Down-Right", 344, 296, 125, 17)
GUICtrlCreateLabel("Move Mouse Down-Left", 24, 296, 118, 17)
GUICtrlCreateLabel("Move Mouse Up-Left", 24, 72, 104, 17)
$Input_1 = GUICtrlCreateInput("{NUMPAD7}", 24, 48, 105, 21, -1, $WS_EX_CLIENTEDGE) ; top left
$Input_2 = GUICtrlCreateInput("{NUMPAD4}", 24, 160, 105, 21, -1, $WS_EX_CLIENTEDGE) ; left
$Input_3 = GUICtrlCreateInput("{NUMPAD1}", 24, 272, 105, 21, -1, $WS_EX_CLIENTEDGE) ; bottom left
$Input_4 = GUICtrlCreateInput("{NUMPAD8}", 192, 48, 105, 21, -1, $WS_EX_CLIENTEDGE) ; top
$Input_5 = GUICtrlCreateInput("{NUMPAD2}", 192, 272, 105, 21, -1, $WS_EX_CLIENTEDGE) ; bottom
$Input_6 = GUICtrlCreateInput("{NUMPAD9}", 344, 48, 105, 21, -1, $WS_EX_CLIENTEDGE) ; top right
$Input_7 = GUICtrlCreateInput("{NUMPAD6}", 344, 160, 105, 21, -1, $WS_EX_CLIENTEDGE) ; right
$Input_8 = GUICtrlCreateInput("{NUMPAD3}", 344, 272, 105, 21, -1, $WS_EX_CLIENTEDGE) ; bottom right
$Button3 = GUICtrlCreateButton("Mouse", 144, 88, 185, 177)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button2 = GUICtrlCreateButton("Left Click", 144, 88, 89, 81)
GUICtrlSetState(-1, $GUI_DISABLE)
$Button1 = GUICtrlCreateButton("Right Click", 240, 88, 89, 81)
GUICtrlSetState(-1, $GUI_DISABLE)
GUICtrlCreateLabel("Sensitivity:", 24, 328, 54, 17)
$Input_9 = GUICtrlCreateInput("70", 80, 328, 49, 21, -1, $WS_EX_CLIENTEDGE)
$Input_10 = GUICtrlCreateInput("{NUMPAD5}", 144, 136, 89, 21, -1, $WS_EX_CLIENTEDGE) ; left click
$Input_11 = GUICtrlCreateInput("{NUMPADADD}", 240, 136, 89, 21, -1, $WS_EX_CLIENTEDGE) ; right click
$TabSheet2 = GUICtrlCreateTabItem("Keys")
$Edit1 = GUICtrlCreateEdit("", 24, 48, 209, 289, -1, $WS_EX_CLIENTEDGE)
GUICtrlSetData($Edit1, "{NUMPAD0} = Number Pad 0" & @CRLF & "{NUMPAD1} = Number Pad 1" & @CRLF & "{NUMPAD2} = Number Pad 2" & @CRLF & "{NUMPAD3} = Number Pad 3" & @CRLF & "{NUMPAD4} = Number Pad 4" & @CRLF & "{NUMPAD5} = Number Pad 5" & @CRLF & "{NUMPAD6} = Number Pad 6" & @CRLF & "{NUMPAD7} = Number Pad 7" & @CRLF & "{NUMPAD8} = Number Pad 8" & @CRLF & "{NUMPAD9} = Number Pad 9" & @CRLF & "" & @CRLF & "{NUMPADMULT} = Number Pad Multiply" & @CRLF & "{NUMPADADD} = Number Pad Add" & @CRLF & "{NUMPADSUB} = Number Pad Subtract" & @CRLF & "{NUMPADDIV} = Number Pad Divide" & @CRLF & "{NUMPADDOT} = Number Pad Period" & @CRLF & "{NUMPADENTER} Number Pad Enter" & @CRLF & "" & @CRLF & "{F1} = F1" & @CRLF & "{F2} = F2" & @CRLF & "{F3} = F3" & @CRLF & "{F4} = F4" & @CRLF & "{F5} = F5" & @CRLF & "{F6} = F6" & @CRLF & "{F7} = F7" & @CRLF & "{F8} = F8" & @CRLF & "{F9} = F9" & @CRLF & "" & @CRLF & "a = a" & @CRLF & "b = b" & @CRLF & "c = c" & @CRLF & "d = d" & @CRLF & "e = e" & @CRLF & "f = f" & @CRLF & "g = g" & @CRLF & "h = h" & @CRLF & "i = i" & @CRLF & "j = j" & @CRLF & "k = k" & @CRLF & "l = l" & @CRLF & "m = m" & @CRLF & "n = n" & @CRLF & "o = o" & @CRLF & "p = p" & @CRLF & "q = q" & @CRLF & "r = r" & @CRLF & "s = s" & @CRLF & "t = t" & @CRLF & "u = u" & @CRLF & "v = v" & @CRLF & "w = w" & @CRLF & "x = x" & @CRLF & "y = y" & @CRLF & "z = z" & @CRLF & "" & @CRLF & "{ALT} = Alt" & @CRLF & "{LALT} = Left Alt Key" & @CRLF & "{RALT} = Right Alt Key" & @CRLF & "{LCTRL} = Left Control Key" & @CRLF & "{RCTRL} = Right Control Key" & @CRLF & "{LSHIFT} = Left Shift Key" & @CRLF & "{RSHIFT} = Right Shift Key" & @CRLF & "" & @CRLF & "{!} = !" & @CRLF & "{#} = #" & @CRLF & "{+} = +" & @CRLF & "{^} = ^" & @CRLF & "{{} = {" & @CRLF & "{}} = }" & @CRLF & "{SPACE} = Space" & @CRLF & "{ENTER} = Enter" & @CRLF & "{ALT} = Alt" & @CRLF & "{BACKSPACE} or {BS} = Backspace" & @CRLF & "{DELETE} or {DEL} = Delete" & @CRLF & "{UP} = Up Arrow" & @CRLF & "{RIGHT} = Right Arrow" & @CRLF & "{DOWN} = Down Arrow" & @CRLF & "{LEFT} = Left Arrow" & @CRLF)
GUICtrlCreateLabel("The left column is the code, and the right column is the key.  Simply copy and paste the code into the Settings page.", 250, 48, 209, 289)
$TabSheet3 = GUICtrlCreateTabItem("Help")
GUICtrlSetState(-1, $GUI_SHOW)
GUICtrlCreateLabel("How to set keys?", 16, 40, 102, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("First, go to the Keys tab and find the keys you want to use from the left collumn.  Then, copy" & @CRLF & "and paste the code on the right collumn that matches your key and paste it in the Settings tab" & @CRLF & "under your desire mouse function.", 16, 56, 1099, 47)
GUICtrlCreateLabel("What is the Sensitivity Input Box?", 16, 112, 196, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("The sensitivity input box shows how much the mouse will move with a single press of the button." & @CRLF & "The higher you set it, the more sensitive it will be.", 16, 128, 745, 37)
GUICtrlCreateLabel("Why won&apos;t it work?", 16, 168, 112, 17)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
GUICtrlCreateLabel("Make sure you have the { and } key around the code,  unless its a letter.", 16, 184, 345, 17)
$TabSheet4 = GUICtrlCreateTabItem("About")
GUICtrlCreateLabel("Mouse2Key stands for: Mouse to Keyboard.  This program sets mouse clicks and movement" & @CRLF & "to keypresses.  These keypresses are defined by YOU!" & @CRLF & "This program was made by:" & @CRLF & @CRLF & "Bigassmuffin", 32, 48, 1480, 87)
GUICtrlCreateTabItem("")
GUISetState(@SW_SHOW)

While 1
    $msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            quit()
        Case $msg = $Button_1
            Play()
        Case $msg = $Button_2
            quit()
        Case Else
            ;;;;;;;
    EndSelect
    If $game = 1 Then
        While 1
            HotKeySet(GUICtrlRead($Input_4), "up")
            HotKeySet(GUICtrlRead($Input_5), "down")
            HotKeySet(GUICtrlRead($Input_2), "left")
            HotKeySet(GUICtrlRead($Input_7), "right")
            HotKeySet(GUICtrlRead($Input_1), "upleft")
            HotKeySet(GUICtrlRead($Input_3), "downleft")
            HotKeySet(GUICtrlRead($Input_6), "upright")
            HotKeySet(GUICtrlRead($Input_8), "downright")
            HotKeySet(GUICtrlRead($Input_10), "click")
            HotKeySet(GUICtrlRead($Input_11), "rclick")
        WEnd

    EndIf
WEnd

Exit

Func up ()
    Local $array = MouseGetPos()
    Local $x = $array[0]
    Local $y = $array[1] - GUICtrlRead($Input_9)
    MouseMove($x, $y, 2)
EndFunc   ;==>up

Func down ()
    Local $array = MouseGetPos()
    Local $x = $array[0]
    Local $y = $array[1] + GUICtrlRead($Input_9)
    MouseMove($x, $y, 2)
EndFunc   ;==>down

Func left ()
    Local $array = MouseGetPos()
    Local $x = $array[0] - GUICtrlRead($Input_9)
    Local $y = $array[1]
    MouseMove($x, $y, 2)
EndFunc   ;==>left

Func right ()
    Local $array = MouseGetPos()
    Local $x = $array[0] + GUICtrlRead($Input_9)
    Local $y = $array[1]
    MouseMove($x, $y, 2)
EndFunc   ;==>right


Func upleft ()
    Local $array = MouseGetPos()
    Local $x = $array[0] - GUICtrlRead($Input_9)
    Local $y = $array[1] - GUICtrlRead($Input_9)
    MouseMove($x, $y, 2)
EndFunc   ;==>upleft

Func downleft ()
    Local $array = MouseGetPos()
    Local $x = $array[0] - GUICtrlRead($Input_9)
    Local $y = $array[1] + GUICtrlRead($Input_9)
    MouseMove($x, $y, 2)
EndFunc   ;==>downleft

Func upright ()
    Local $array = MouseGetPos()
    Local $x = $array[0] + GUICtrlRead($Input_9)
    Local $y = $array[1] - GUICtrlRead($Input_9)
    MouseMove($x, $y, 2)
EndFunc   ;==>upright

Func downright ()
    Local $array = MouseGetPos()
    Local $x = $array[0] + GUICtrlRead($Input_9)
    Local $y = $array[1] + GUICtrlRead($Input_9)
    MouseMove($x, $y, 2)
EndFunc   ;==>downright


Func click ()
    MouseClick("left")
EndFunc   ;==>click

Func rclick ()
    MouseClick("right")
EndFunc   ;==>rclick

Func Play()
    If $game < 1 Then
        $game = $game + 1
    Else
        $game = 0
    EndIf
EndFunc   ;==>Play

Func quit()
    Exit
EndFunc   ;==>quit
My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.
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...