mouse hotkeys get forgotten Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

mouse hotkeys get forgotten

22 Sep 2018, 05:29

I have these 2 specific hotkeys. Sometimes all of my hotkeys remain working, but these 2 hotkeys alone fail. I wondered if anyone had any ideas. Thanks.

Code: Select all

RButton & WheelUp:: ;anywhere - zoom in/out
SendInput, ^{WheelUp}
return

RButton & WheelDown:: ;anywhere - zoom in/out
SendInput, ^{WheelDown}
return
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA
User avatar
SL5
Posts: 879
Joined: 12 May 2015, 02:10
Contact:

Re: mouse hotkeys get forgotten

22 Sep 2018, 06:13

maybe rewrite. with a second check weith
https://autohotkey.com/docs/commands/GetKeyState.htm
?

and maybe put a

suspend, on

around your commands
Rohwedder
Posts: 7630
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: mouse hotkeys get forgotten

22 Sep 2018, 10:26

Hallo,
try not to block RButton's native function:

Code: Select all

RButton::Return
RButton Up::Send,% A_PriorHotkey = "RButton"?"{RButton}":
RButton & WheelUp:: ;anywhere - zoom in/out
SendInput, ^{WheelUp}
return
RButton & WheelDown:: ;anywhere - zoom in/out
SendInput, ^{WheelDown}
return
User avatar
jeeswg
Posts: 6902
Joined: 19 Dec 2016, 01:58
Location: UK

Re: mouse hotkeys get forgotten  Topic is solved

22 Sep 2018, 12:39

- @Rohwedder: Thanks. I was not aware that it blocked RButton's native function. Perhaps because I have other RButton hotkeys in the same or other scripts.

- I figured out the problem. I have a script that minimises to the system tray that uses RButton. My hotkey above will work depending on which of 2 scripts was reloaded most recently.
homepage | tutorials | wish list | fun threads | donate
WARNING: copy your posts/messages before hitting Submit as you may lose them due to CAPTCHA

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: doodles333, Frogrammer, Google [Bot] and 265 guests