anti recoil suspend Topic is solved

Ask gaming related questions (AHK v1.1 and older)
Emilio

anti recoil suspend  Topic is solved

13 Mar 2018, 22:54

I have a recoil macro but I want to suspend the macro when my cursor is visible. I add the first script to the second but it doesnt seem to work.

need help
thanks

Code: Select all


isMouseShown()
{
   StructSize := A_PtrSize + 16
   VarSetCapacity(InfoStruct, StructSize)
   NumPut(StructSize, InfoStruct)
   DllCall("GetCursorInfo", UInt, &InfoStruct)
   Result := NumGet(InfoStruct, 8)

   if Result > 1
      return 1
   else
      return 0
}

Loop
{
   if isMouseShown() == 1
      Suspend On
   else
      Suspend Off

   Sleep 500
}

#NoEnv
#InstallKeybdHook
#InstallMouseHook
SetDefaultMouseSpeed, 0
SetMouseDelay, -1
SetKeyDelay, -1
SetWinDelay, -1
SetBatchLines, -1
SetControlDelay -1
#MaxThreads 30
#MaxThreadsBuffer on
#KeyHistory 0
SendMode Input
#UseHook

_auto := true

~LButton::autofire()
Numpad9::_auto := ! _auto

autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 40
mouseXY(0, 1.2)
SendInput {LButton Up}
Sleep 20
}
else
break
} ;; loop
} ;; if
} ;; autofire()

mouseXY(x,y)
{
DllCall("mouse_event",uint,1,int,x,int,y,uint,0,int,0)
}

Numpad3::Suspend

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 127 guests