BlockInput Send doesn't work

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
User avatar
ibieel
Posts: 216
Joined: 17 Oct 2021, 23:30

BlockInput Send doesn't work

Post by ibieel » 27 Apr 2023, 08:40

why this script doesnt work?

Code: Select all

#Persistent

BlockInput, Send
msgbox, KeyBoard OFF

Return
RussF
Posts: 1311
Joined: 05 Aug 2021, 06:36

Re: BlockInput Send doesn't work

Post by RussF » 27 Apr 2023, 09:23

You can't make up your own syntax. From BlockInput
BlockInput, OnOff
BlockInput, SendMouse
BlockInput, MouseMove ; [v1.0.43.11+]
Russ
gregster
Posts: 9114
Joined: 30 Sep 2013, 06:48

Re: BlockInput Send doesn't work

Post by gregster » 27 Apr 2023, 09:29

Afaics, Blockinput, Send is valid syntax, but since the script doesn't send anything, I am not sure what OP's code snippet wants to prove:
https://www.autohotkey.com/docs/v1/lib/BlockInput.htm#Parameters wrote:SendMouse

This mode only blocks user inputs while specific send and/or mouse commands are in progress. Specify one of the following words:

Send: The user's keyboard and mouse input is ignored while a Send or SendRaw is in progress (the traditional SendEvent mode only). This prevents the user's keystrokes from disrupting the flow of simulated keystrokes. When the Send finishes, input is re-enabled (unless still blocked by a previous use of BlockInput On).

[...]
@ibieel, based on these docs, I can't see anything unexpected here.
RussF
Posts: 1311
Joined: 05 Aug 2021, 06:36

Re: BlockInput Send doesn't work

Post by RussF » 27 Apr 2023, 10:27

:oops: I'm so embarrassed. I looked at the top of the doc page and just saw those three options without reading further down. That's what happens when you're in a hurry. My apologies @ibieel!

Russ
User avatar
ibieel
Posts: 216
Joined: 17 Oct 2021, 23:30

Re: BlockInput Send doesn't work

Post by ibieel » 27 Apr 2023, 18:46

gregster wrote:
27 Apr 2023, 09:29
Afaics, Blockinput, Send is valid syntax, but since the script doesn't send anything, I am not sure what OP's code snippet wants to prove:
https://www.autohotkey.com/docs/v1/lib/BlockInput.htm#Parameters wrote:SendMouse

This mode only blocks user inputs while specific send and/or mouse commands are in progress. Specify one of the following words:

Send: The user's keyboard and mouse input is ignored while a Send or SendRaw is in progress (the traditional SendEvent mode only). This prevents the user's keystrokes from disrupting the flow of simulated keystrokes. When the Send finishes, input is re-enabled (unless still blocked by a previous use of BlockInput On).

[...]
@ibieel, based on these docs, I can't see anything unexpected here.
when I give the command "BlockInput, On" I can't type anything.
so I figured that the "BlockInput, Send" command would also block the keyboard to the point of not being able to type anything, but you're telling me that it only blocks the keyboard when a "Send" command is being executed in the script?

my script have "SendMode, Input" , will this work? I think I need other alternatives
Post Reply

Return to “Ask for Help (v1)”