Help making a script to use mouse scroll wheel for item hotbar in Grounded

Ask gaming related questions (AHK v1.1 and older)
trackhawk
Posts: 1
Joined: 08 Jan 2022, 18:15

Help making a script to use mouse scroll wheel for item hotbar in Grounded

08 Jan 2022, 18:18

Found a thread on steam that led me here but the solution posted was for Ark Survival Evolved. Can someone help me with this for the game Grounded?

Thanks
User avatar
YoucefHam
Posts: 372
Joined: 24 Aug 2015, 12:56
Location: Algeria
Contact:

Re: Help making a script to use mouse scroll wheel for item hotbar in Grounded

11 Jan 2022, 19:49

trackhawk wrote:
08 Jan 2022, 18:18
Found a thread on steam that led me here but the solution posted was for Ark Survival Evolved. Can someone help me with this for the game Grounded?
Thanks
Hi, try this

Code: Select all

#NoEnv
SendMode Input
SetWorkingDir %A_ScriptDir%
#SingleInstance force

keyi := 1
lastKey := 0

*~WheelUp::
*~WheelDown::
IfInString, A_ThisHotkey, Up
	keyi += ((keyi < 10 and keyi >= 1) ? 1 : 0)
else
	keyi -= ((keyi <= 10 and keyi > 1) ? 1 : 0)
if (lastKey = keyi)
	return
keysOn := false
SetTimer, SendKey, Off
if lastKey = keyi
	return
lastKey := keyi
keysOn := true
SetTimer, SendKey, -350
return

*~SC002::
*~SC003::
*~SC004::
*~SC005::
*~SC006::
*~SC007::
*~SC008::
*~SC009::
*~SC00A::
*~SC00B::
keyi := GetKeySC(strReplace(A_ThisHotkey,"*~","")) - 1
return

SendKey:
if !keysOn
	return
Send, % "{SC00" format("{:X}",keyi+1) " Down}"
Sleep, 61
Send, % "{SC00" format("{:X}",keyi+1) " Up}"
return
:wave: There is always more than one way to solve a problem. ;)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 36 guests