Results 1 to 3 of 3
  1. #1
    tester123321's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    2

    Autoit Basic Macro - Mouse movement NOT smooth ingame

    The problem is mouse movement really NOT smooth ingame (after mouse hook _WinAPI_SetWindowsHookEx, but unhook its fine)...
    (mouse lag? lol what ever it is)

    Sorry about my bad english and im totally noob... then any advice

    I test this in AVA SEA

    ~.~ i dont really sure what leech code mean... but i wrote this... and this simple... cuz i noob... nvm

    Code:
    #NoTrayIcon
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #Obfuscator_Parameters=/cs /cn /cf /sf 0 /sv 1 /sci 0
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
    #include <Timers.au3>
    #include <WinAPI.au3>
    #include <Constants.au3>
    #include <WindowsConstants.au3>
    
    HotKeySet("{END}", "A5B00301A3D")
    HotKeySet("{HOME}", "OnAutoItExit")
    
    Global $bActive = False
    Global $hTimer
    
    Global $iDelay = 10
    Global $hTimerDelay = _Timer_Init()
    Global $hTimer = _Timer_Init()
    
    Global $hHook, $hStub_KeyProc
    Global $bFire = False
    Global $hmod
    Global $iRecoil = 0.5
    
    
    While 1
    	If $bActive Then
    		If $bFire Then
    			If _Timer_Diff($hTimer) > $iDelay Then
    				If $iRecoil < 0.5 Then $iRecoil += 0.02 ; ~.~ this quite useless
    				If $iRecoil = 0.5 Then $iRecoil = 0.1 ;    
    				_WinAPI_Mouse_Event($MOUSEEVENTF_MIDDLEDOWN, 0, $iRecoil)
    				;_WinAPI_Mouse_Event($MOUSEEVENTF_MIDDLEDOWN, 0, 0.1) ; No $iRecoil ctrl
    				_WinAPI_Mouse_Event($MOUSEEVENTF_MIDDLEUP, 0, 0)
    			EndIf
    		EndIf
    	Else
    		Sleep(100)
    	EndIf
    WEnd
    
    Func _KeyProc($nCode, $wParam, $lParam)
    	;Local $tKEYHOOKS
    	If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    	If $wParam = $WM_MBUTTONDOWN Or $wParam = $WM_MBUTTONUP Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    
    	If $wParam = $WM_LBUTTONDOWN Then
    		$bFire = True
    	EndIf
    	If $wParam = $WM_LBUTTONUP Then
    		$bFire = False
    		$iRecoil = 0.5
    	EndIf
    	Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    EndFunc   ;==>_KeyProc
    
    Func OnAutoItExit()
    	_WinAPI_UnhookWindowsHookEx($hHook)
    	DllCallbackFree($hStub_KeyProc)
    EndFunc   ;==>OnAutoItExit
    
    #Obfuscator_off
    Func A5B00301A3D()
    	#Obfuscator_on
    	$iTimer = _Timer_Diff($hTimerDelay)
    	If $iTimer > 5000 Then
    		$hTimerDelay = TimerInit()
    		If $bActive Then
    			ConsoleWrite("! Deactivate" & @CRLF)
    			_WinAPI_UnhookWindowsHookEx($hHook)
    			DllCallbackFree($hStub_KeyProc)
    			SoundPlay("dea.wav", 1)
    			$bActive = False
    		Else
    			ConsoleWrite("! Activate" & @CRLF)
    			SoundPlay("act.wav", 1)
    			$hStub_KeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam")
    			$hmod = _WinAPI_GetModuleHandle("AVA.exe")
    			$hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($hStub_KeyProc), $hmod)
    			$bActive = True
    		EndIf
    	EndIf
    EndFunc   ;==>A5B00301A3D
    Thanks for your help...

  2. #2
    Chrome Boy's Avatar
    Join Date
    Aug 2012
    Gender
    male
    Location
    Freedom
    Posts
    1,437
    Reputation
    10
    Thanks
    5,133
    My Mood
    Devilish
    Quote Originally Posted by tester123321 View Post
    The problem is mouse movement really NOT smooth ingame (after mouse hook _WinAPI_SetWindowsHookEx, but unhook its fine)...
    (mouse lag? lol what ever it is)

    Sorry about my bad english and im totally noob... then any advice

    I test this in AVA SEA

    ~.~ i dont really sure what leech code mean... but i wrote this... and this simple... cuz i noob... nvm

    Code:
    #NoTrayIcon
    #region ;**** Directives created by AutoIt3Wrapper_GUI ****
    #Obfuscator_Parameters=/cs /cn /cf /sf 0 /sv 1 /sci 0
    #endregion ;**** Directives created by AutoIt3Wrapper_GUI ****
    
    #include <Timers.au3>
    #include <WinAPI.au3>
    #include <Constants.au3>
    #include <WindowsConstants.au3>
    
    HotKeySet("{END}", "A5B00301A3D")
    HotKeySet("{HOME}", "OnAutoItExit")
    
    Global $bActive = False
    Global $hTimer
    
    Global $iDelay = 10
    Global $hTimerDelay = _Timer_Init()
    Global $hTimer = _Timer_Init()
    
    Global $hHook, $hStub_KeyProc
    Global $bFire = False
    Global $hmod
    Global $iRecoil = 0.5
    
    
    While 1
    	If $bActive Then
    		If $bFire Then
    			If _Timer_Diff($hTimer) > $iDelay Then
    				If $iRecoil < 0.5 Then $iRecoil += 0.02 ; ~.~ this quite useless
    				If $iRecoil = 0.5 Then $iRecoil = 0.1 ;    
    				_WinAPI_Mouse_Event($MOUSEEVENTF_MIDDLEDOWN, 0, $iRecoil)
    				;_WinAPI_Mouse_Event($MOUSEEVENTF_MIDDLEDOWN, 0, 0.1) ; No $iRecoil ctrl
    				_WinAPI_Mouse_Event($MOUSEEVENTF_MIDDLEUP, 0, 0)
    			EndIf
    		EndIf
    	Else
    		Sleep(100)
    	EndIf
    WEnd
    
    Func _KeyProc($nCode, $wParam, $lParam)
    	;Local $tKEYHOOKS
    	If $nCode < 0 Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    	If $wParam = $WM_MBUTTONDOWN Or $wParam = $WM_MBUTTONUP Then Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    
    	If $wParam = $WM_LBUTTONDOWN Then
    		$bFire = True
    	EndIf
    	If $wParam = $WM_LBUTTONUP Then
    		$bFire = False
    		$iRecoil = 0.5
    	EndIf
    	Return _WinAPI_CallNextHookEx($hHook, $nCode, $wParam, $lParam)
    EndFunc   ;==>_KeyProc
    
    Func OnAutoItExit()
    	_WinAPI_UnhookWindowsHookEx($hHook)
    	DllCallbackFree($hStub_KeyProc)
    EndFunc   ;==>OnAutoItExit
    
    #Obfuscator_off
    Func A5B00301A3D()
    	#Obfuscator_on
    	$iTimer = _Timer_Diff($hTimerDelay)
    	If $iTimer > 5000 Then
    		$hTimerDelay = TimerInit()
    		If $bActive Then
    			ConsoleWrite("! Deactivate" & @CRLF)
    			_WinAPI_UnhookWindowsHookEx($hHook)
    			DllCallbackFree($hStub_KeyProc)
    			SoundPlay("dea.wav", 1)
    			$bActive = False
    		Else
    			ConsoleWrite("! Activate" & @CRLF)
    			SoundPlay("act.wav", 1)
    			$hStub_KeyProc = DllCallbackRegister("_KeyProc", "long", "int;wparam;lparam")
    			$hmod = _WinAPI_GetModuleHandle("AVA.exe")
    			$hHook = _WinAPI_SetWindowsHookEx($WH_MOUSE_LL, DllCallbackGetPtr($hStub_KeyProc), $hmod)
    			$bActive = True
    		EndIf
    	EndIf
    EndFunc   ;==>A5B00301A3D
    Thanks for your help...
    Doubt you coded you need good amount of english to write codes.


    ---------- Post added at 04:48 PM ---------- Previous post was at 04:47 PM ----------

    If you did write it I suggest removing it and pming macro makers since ppl will leech.



  3. #3
    tester123321's Avatar
    Join Date
    Dec 2011
    Gender
    male
    Posts
    5
    Reputation
    10
    Thanks
    2
    Quote Originally Posted by Chrome Boy View Post


    Doubt you coded you need good amount of english to write codes.


    ---------- Post added at 04:48 PM ---------- Previous post was at 04:47 PM ----------

    If you did write it I suggest removing it and pming macro makers since ppl will leech.
    i dunt understand ... why i have to remove it? "pming = pmang" is it? ... ppl will leech...? .... T_T
    sorry my bad english... i have no interested in macro anymore... how can i request thread removal?

Similar Threads

  1. (Windows 7)(64bit) Hacks injecting and not appearing ingame
    By Stelthkid in forum Combat Arms Help
    Replies: 13
    Last Post: 10-06-2010, 03:10 PM
  2. Replies: 14
    Last Post: 04-09-2010, 06:32 PM
  3. Please do not kick ingame other hacks.
    By vingadormaster in forum Combat Arms EU Discussions
    Replies: 15
    Last Post: 04-09-2010, 03:56 AM
  4. [Help] Send Key/Mouse movements to crossfire?
    By HackManster in forum CrossFire Hacks & Cheats
    Replies: 16
    Last Post: 01-28-2010, 03:11 PM
  5. Replies: 6
    Last Post: 11-26-2007, 07:46 PM