Help combining two scripts

Ask gaming related questions
a59x
Posts: 17
Joined: 03 Mar 2019, 19:10

Help combining two scripts

03 Mar 2019, 19:17

Hey everyone, I'm very new to AutoHotKey I'm trying to combine these two scripts below without any luck so far.

Code: Select all

#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()
NumPad1::_auto := ! _auto

autofire()
{
global _auto
if _auto
{
Loop
{
if GetKeyState("LButton", "P")
{
SendInput {LButton DownTemp}
Sleep 25 // high = slow , Low = fast
mouseXY(0, 2) // high = stong , low = weak
SendInput {LButton Up}
Sleep 25 // high = slow , Low = fast
}
else
break
} ;; loop
} ;; if
} ;; autofire()

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

Capslock::Suspend

Space::
Send, {Space Down}{C Down}
return

Space Up::
Send, {Space Up}{C Up}
return

Code: Select all

L:: Hotkey, $PButton, Toggle
LButton::
Loop
{
SetMouseDelay 80
Click
If (GetKeyState("LButton","P")=0)
Break
}
I'm trying to add script two functionality to script one but i keep getting L key being a duplicate error...and i also want to remove the autofire function from the script.

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 49 guests