Code: Select all
is it possible to just send a certain key once when u hold the macro activation key ? for example , 2a a a a a a a a a a a . when i hold the macro button it will send 2 once only and after i release and press it again it will do the same.Another thing , how can i make it so that as long as i hold the macro key , it will also hold right click until i release it.Also how to make it reach maximum speed at 16.1
here is my script:
#InstallMouseHook
#NoEnv
#MaxHotkeysPerInterval 99000000
#HotkeyInterval 99000000
#KeyHistory 0
ListLines Off
Process, Priority, , H
SetBatchLines, -1
SetKeyDelay, -1, -1
SetMouseDelay, -1
SetDefaultMouseSpeed, 0
SetWinDelay, -1
SetControlDelay, -1
SendMode Input
if not A_IsAdmin
{
MsgBox, You are running this script with no administrator rights. It may not work.
}
$*MButton::
;ensuring that the player doesn't interfere with the macro
Send {SC011 Up} ;W
Send {SC01E Up} ;A
Send {SC01F Up} ;S
Send {SC020 Up} ;D
;the actual inputs
Send {Space Down}
DllCall("kernel32.dll\Sleep", "UInt", 16.5)
Send {2 Down}
Send {Click Right Down}
Send {Space Up}
DllCall("kernel32.dll\Sleep", "UInt", 16.5)
Send {2 Up}
Send {SC020 Down}
Send {Space Down}
DllCall("kernel32.dll\Sleep", "UInt", 16.5)
Send {Space Up}
Send {SC020 Up}
;ensuring that the macro doesn't interfere with the player
if GetKeyState("SC011","P")
Send {SC011 Down}
if GetKeyState("SC01E","P")
Send {SC01E Down}
if GetKeyState("SC01F","P")
Send {SC01F Down}
if GetKeyState("SC020","P")
Send {SC020 Down}
DllCall("kernel32.dll\Sleep", "UInt", 350)
if GetKeyState("RButton","P")
Send {Click Right Down}
else
Send {Click Right Up}
return