Why installing kb hook stops send command from working

Ask gaming related questions (AHK v1.1 and older)
Stealthle
Posts: 32
Joined: 13 Mar 2017, 00:48

Why installing kb hook stops send command from working

21 Jun 2017, 21:48

My script was working great but after reinstalling my os(same os as before, win 7 64bit) the send command will not work if any other running script has kb hook installed.

My script is an aimbot and it uses multiple scripts to allow timers to not interrupt other time critical threads.

Another issue that started after new os install is that using shift as a hotkey will stop send commands from working even if in the same script.For instance this the send command wont work

Loop
{
Send F
sleep 1000
}


Lshift::


Thats it.I dont even have to put anything for Lshift to execute.Just the mere presents of it will not allow and send commands in same script of other running scripts to work.

Like I said it was working perfect before OS reinstall.
Im thinking they are related issues as that maybe assigning shift as hotkey forces kb hook to be installed?...any help would be great!...thank you
Stealthle
Posts: 32
Joined: 13 Mar 2017, 00:48

Re: Why installing kb hook stops send command from working

21 Jun 2017, 21:55

Unfortunately in its current state the bot is nearly useless as without being able to use kb hook the getkeystate command is highly unreliable
User avatar
evilC
Posts: 4823
Joined: 27 Feb 2014, 12:30

Re: Why installing kb hook stops send command from working

22 Jun 2017, 05:35

I take it the script is using the SendInput send mode?

From the docs:
If a script other than the one executing SendInput has a low-level keyboard hook installed, SendInput automatically reverts to SendEvent (or SendPlay if SendMode InputThenPlay is in effect). This is done because the presence of an external hook disables all of SendInput's advantages, making it inferior to both SendPlay and SendEvent. However, since SendInput is unable to detect a low-level hook in programs other than AutoHotkey v1.0.43+, it will not revert in these cases, making it less reliable than SendPlay/Event.

Use regular SendEvent, it works better with games (You often need SetKeyDelay, 0, 50 to make games see the input, which is compatible with SendEvent, but not SendInput)

Return to “Gaming Help (v1)”

Who is online

Users browsing this forum: No registered users and 107 guests