Page 1 of 1
Block input
Posted: 25 Apr 2024, 19:10
by akirofe
Hi,
I'm trying to read this but can't understand everything quickly (explained in my signature thanks...
)
https://www.autohotkey.com/docs/v1/lib/BlockInput.htm
Could you please help me with a codes to block AND unblock (mouse and keyboard inputs) with a key combination, say, <+F23 (I have F23 on my MMO mouse) thank you very much?
Re: Block input
Posted: 26 Apr 2024, 02:16
by Rohwedder
Hallo,
try (not tested with MMO mouse):
Code: Select all
#Requires AutoHotkey v1.1.33
+F23 Up::BlockInput,% (Block:=!Block)?"On":"Off"
or:
Code: Select all
#Requires AutoHotkey v2.0
+F23 Up:: {
Static Block := False
BlockInput (Block:=!Block)
}
Such a big mouse with 12 side keys should better be called a rat.
Re: Block input
Posted: 28 Apr 2024, 23:26
by akirofe
Hi Rohwedder,
Long time no see dear Rohwedder. I hope you are well Rohwedder.
I don't know what I did wrong but it didn't seem to work - even when I changed to just F6 key to test... Please help me Rohwedder.
PS. Would you call an Azeron gamepad... a "cougar"... Rohwedder?
Re: Block input
Posted: 29 Apr 2024, 00:30
by Rohwedder
You must not have done anything wrong.
According to the manual, BlockInput On/Off sometimes does not work:
https://www.autohotkey.com/docs/v1/lib/BlockInput.htm#Remarks
https://www.autohotkey.com/docs/v2/lib/BlockInput.htm#Remarks
Note: The OnOff and SendMouse modes might have no effect if UAC is enabled or the script has not been run as administrator.
(This gamepad reminds me of a tiger's paw with extended claws.)
Re: Block input
Posted: 29 Apr 2024, 01:42
by akirofe
Thank you very much Rohwedder! Yes you are right, I'm using company's pc...
((