Freezing game can not use shift to sprint Topic is solved

Ask gaming related questions (AHK v1.1 and older)
User avatar
Fren
Posts: 4
Joined: 01 Dec 2022, 16:41

Freezing game can not use shift to sprint

Post by Fren » 01 Dec 2022, 17:37

What I want the script to do: When I hold down F on the keyboard I want to spam F as quick as possible and stop it when I let go of F, as to drop items as fast as possible in game, hence no sleep in the script, so to not slow down the drops, however it seems to screw up the sprint button (shift). And even either disable the sprint, or freeze the entire game.

Code: Select all


#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 2
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1


#IfWinExist GameTitleName (edited out)

F3::
Macro1:
Send, {f Down}
Loop
{
    Send, {f Up}
}
Return

#IfWinExist

F8::ExitApp

F12::Pause
[Mod edit: [code][/code] tags added.]

User avatar
mikeyww
Posts: 26888
Joined: 09 Sep 2014, 18:38

Re: Freezing game can not use shift to sprint

Post by mikeyww » 01 Dec 2022, 19:06

Welcome to this AutoHotkey forum!

Code: Select all

$f::
While GetKeyState("f", "P")
 Send f
Return

User avatar
Fren
Posts: 4
Joined: 01 Dec 2022, 16:41

Re: Freezing game can not use shift to sprint

Post by Fren » 02 Dec 2022, 10:38

@mikeyww
Thanks

Is there some way to make it so it is possible for the script to ignore that I am holding down left-shift, so I can sprint whilst using this script?

User avatar
mikeyww
Posts: 26888
Joined: 09 Sep 2014, 18:38

Re: Freezing game can not use shift to sprint  Topic is solved

Post by mikeyww » 02 Dec 2022, 10:48

You can replace dollar with asterisk.

Post Reply

Return to “Gaming Help (v1)”