Foxhole How to Toggle ClickLock While In-Game + AutoHotkey

Foxhole How to Toggle ClickLock While In-Game + AutoHotkey 1 - steamsplay.com
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey 1 - steamsplay.com

Stop holding down LMB for hours and let your computer do it for you! How to enable ClickLock feature in Windows and set a hotkey to toggle it while in-game using AHK!
 
 

Introduction

Have you ever wished that hammering out vehicles in a garage, scrapping salvage for hours, or many of the things in Foxhole that wear out your left mouse button and associated finger could be alleviated? Well, there is a solution!
 
 
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey - Introduction - EBAE1E5
 
 
 

Enabling ClickLock

Windows has a built-in feature called ClickLock, found under the mouse settings. Just open up the Settings menu, nagivate to Devices > Mouse > Additional Mouse Options, and you will see the dialog box with the checkbox to toggle it.
 
 
Now you can hold down LMB for a couple seconds to trigger it! Your click will hold until you click again! Your finger will thank you!
 
 
This is great already as it is, but you will still have to tab out of the game every time you want to toggle it. There is a better way!
 
 
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey - Enabling ClickLock - 68E4F63
 
 
 

Installing AutoHotkey

AutoHotkey is a scripting software that you can use to make your own hotkey to toggle ClickLock with.
 
 
Open your browser and navigate to AutoHotkey’s website – [autohotkey.com] , download, and install it!
 
 
Once done, you can then proceed to creating a script!
 
 
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey - Installing AutoHotkey - 98DBCBC
 
 
 

Creating an AHK Script

Open up Explorer and choose where you want to have your script be stored.
 
 
AHK will have added itself to your right-click context menu, so you can chooseNew > AutoHotkey Script. Name the file whatever you like!
 
 
Right click the file andEdit Script or open it in your preferred editor!
 
 
The contents are as simple as this!
 
 

~ScrollLock::
DllCall("SystemParametersInfo", "UInt", 0x101F, "UInt", 0, "UInt", toggle:=!toggle, "UInt", 0) ;SPI_SETMOUSECLICKLOCK
Return

 
 
The first line sets the keybind that you want to toggle ClickLock, the second line creates the call to toggle it, and the third line returns the code to be ran!
 
 
In this example, I am using the Scroll Lock key to toggle ClickLock, but you can set it to anything you like! For documentation on how to choose your own hotkeys, see AHK’s website – [autohotkey.com] !
 
 
Double click to run it and you can now toggle ClickLock while in Foxhole!
 
 
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey - Creating an AHK Script - 17000C5
 
 
 

Scheduling a Task

There is one more step you can take to make your life easier, and that is to make it so this script is ran every time you log in to your computer so you don’t have to manually launch it!
 
 
The best way to go about this is using Task Scheduler. There are a number of ways to open it, but one of the quickest is to open Run using Win + R and entering taskschd.msc.
 
 
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey - Scheduling a Task - F0F15BA
 
 
Once open click Create Basic Task… on the right.
 
 
Name it whatever you wish and then proceed to the Trigger section. Here set it to When I log on, and then proceed. Under Action, leave it as Start a program.
 
 
Under program/script, enter “C:\Program Files\AutoHotkey\AutoHotkey.exe”, or wherever you have installed the AHK executable. Under the arguments section, add the location of your script! In my example, it is at C:\ClickLock.ahk.
 
 
Proceed and click Finish, and you are done!
 
 
Foxhole How to Toggle ClickLock While In-Game + AutoHotkey - Scheduling a Task - 30278F2
 
 

Written by yurisuika

 
 
Here we come to an end for Foxhole How to Toggle ClickLock While In-Game + AutoHotkey hope you enjoy it. If you think we forget something to include or we should make an update to the post let us know via comment, and we will fix it asap! Thanks and have a great day!
 


Be the first to comment

Leave a Reply

Your email address will not be published.


*