darknezz21 Posted August 31, 2013 Share Posted August 31, 2013 (edited) How would the hotkey line with button[6] be modified to support 2 button presses? Tried to use & operator but it gave me errors. expandcollapse popup#include <_XInput.au3> $dll = DllOpen("user32.dll") $inputhwnd = _XInputInit() $fire1=0 $fire2=0 $forward = 0 $left = 0 $right = 0 $back = 0 $crouch = 0 $sensitivity = 1000 ;Higher Value equals less sensitive While 1 $input = _XInputGetInput($inputhwnd) $buttons = _XInputButtons($input[2]) If $input[4]<200 Then If $fire1=1 Then MouseUp("left") $fire1=0 EndIf Else If $fire1=0 then MouseDown ( "left" ) $fire1=1 EndIf EndIf ;;;; ;;This part need two hotkeys instead of just one;; ;;;; If $buttons[6] Then If abs($input[7]) > 4000 Or abs($input[8])>4000 Then _MouseMovePlus((($buttons[8]*2)+1)*($input[7]/$sensitivity),-(($buttons[8]*2)+1)*($input[8]/$sensitivity),$dll) Endif _MySleep(20) WEnd Func _MySleep($t) DllCall("winmm.dll","long","timeBeginPeriod","long",1) DllCall("kernel32.dll", "none", "Sleep", "long", $t) DllCall("winmm.dll","long","timeEndPeriod","long",1) EndFunc Func _MouseMovePlus($X = "", $Y = "",$dll = 0) Local $MOUSEEVENTF_MOVE = 0x1 If $dll = 0 Then DllCall("user32.dll", "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) Else DllCall($dll, "none", "mouse_event", _ "long", $MOUSEEVENTF_MOVE, _ "long", $X, _ "long", $Y, _ "long", 0, _ "long", 0) EndIf EndFunc Edited August 31, 2013 by darknezz21 Link to comment Share on other sites More sharing options...
Bert Posted August 31, 2013 Share Posted August 31, 2013 Sorry dude. We do not allow for game automation discussions to be done here. Please read the forum rules. The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
darknezz21 Posted August 31, 2013 Author Share Posted August 31, 2013 This is simply a joy to mouse script that was found on these forums, there's no automation in here. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted August 31, 2013 Moderators Share Posted August 31, 2013 darknezz21,A variable named "$fire1" and your use of _MouseMovePlus say otherwise. Thread locked. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
Recommended Posts