Autohotkey messes with system keyboard input while running with controlsend

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
earlyraven
Posts: 1
Joined: 21 Apr 2017, 12:48

Autohotkey messes with system keyboard input while running with controlsend

21 Apr 2017, 13:57

I decided to use controlsend with my script so that I could perform other tasks on the PC while the script is running. However, I've noticed that the script causes my system to improperly register key presses.

Code:

Code: Select all

F1::ClickMouse(5000000)
f2::
Pause
Suspend
return
ClickMouse(vCount)
{

	Loop, 500000
	{
		Loop, 20
		{
			ControlSend, , {1 down}{1 up}, Realm Grinder
			Sleep, 10
		}

		Sleep, 5
	}
}
return
F3::ExitApp
;^!+`::ExitApp
Outcome:
Script works as desired (sending the keypresses to the proper application... and works even when window is minimized.

I then try to do other tasks on PC while script is running.
However, while the script is running, if I try to use "Ctrl + c", "Ctrl + v" (ie. copy, paste), or any other such key-combo ("Ctrl + t), it works only a fraction of the time (ei. "Ctrl + c" sometimes works properly, but often just behaves as if i only pressed c)....really annoying as this means I can't reliably use this to copy and paste text. This also messes with "Shift + key) in the same manner ("Shift + a) is sometimes "A" but othertimes just "a".

Question(s):
What is causing this issue?
How can I edit this script to continue to perform well in the background but not have the annoying issue discussed above?

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: No registered users and 272 guests