Press Shift to toggle ScrollLock Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
DooMWhite
Posts: 11
Joined: 23 Oct 2019, 16:53

Press Shift to toggle ScrollLock

19 Jun 2020, 18:59

Hi, I'm trying to make a script that toggles/untoggles scrolllock with the press of RShift, but I couldn't do it like I wanted.
I tried

Code: Select all

RShift::SetScrollLockState, on
And

Code: Select all

RShift::ScrollLock
Neither worked as I wanted, I think the right way should be something with the first code.
User avatar
Xtra
Posts: 2750
Joined: 02 Oct 2015, 12:15

Re: Press Shift to toggle ScrollLock  Topic is solved

19 Jun 2020, 19:02

Code: Select all

RShift::SetScrollLockState, % (toggle:=!toggle) ? "On" : "Off"
HTH
DooMWhite
Posts: 11
Joined: 23 Oct 2019, 16:53

Re: Press Shift to toggle ScrollLock

19 Jun 2020, 19:09

Xtra wrote:
19 Jun 2020, 19:02

Code: Select all

RShift::SetScrollLockState, % (toggle:=!toggle) ? "On" : "Off"
HTH
Tyvm, it is working.
But for some reason it's not working with this code I'm using:

Code: Select all

LButton::MButton
~ScrollLock::
	Suspend Permit
	Sleep,10
	Suspend % GetKeyState("ScrollLock","T") ? "On" : "Off"
Return
Do you know why?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Araphen and 416 guests