"how to toggle a toggle"

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
tsukimonowaski
Posts: 1
Joined: 01 Jul 2022, 20:43

"how to toggle a toggle"

Post by tsukimonowaski » 01 Jul 2022, 21:06

So.. I was wondering if it was possible to toggle a script that has a toggle. ex: "c" is the key i use to toggle a specific script. i want a script that makes it so when i press "y", everytime i press the left mouse button "c" is also pressed and when i press y again it untoggles so when i press the left mouse button again "c" shouldnt be pressed. im very sorry if that isnt well understood. im in a bit of a rush

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

Re: "how to toggle a toggle"

Post by mikeyww » 02 Jul 2022, 05:04

Welcome to this AutoHotkey forum!

Code: Select all

y::
on := !on
SoundBeep, 1000 + 500 * on
Return
#If on
~LButton Up::Send c
#If

Post Reply

Return to “Ask for Help (v1)”