Basic Controlsend help

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Bloodwolves
Posts: 1
Joined: 26 May 2024, 23:19

Basic Controlsend help

26 May 2024, 23:26

I am having trouble figuring out where I am going wrong.
In very basic terms I want to use ControlSend instead of Send as I want the arrow key right to be pressed down while the application is not active.

Code: Select all

F3::
Loop
{
Send {Right Down}
}
This works ^

The issue I'm running into is when I put

Code: Select all

 F3::
Loop
{
ControlSend, SunAwtCanvas2, {Right Down}, RuneLite 
}
Its not working. I've also tried leaving the "control" blank to see if it work with just the Keys and WinTitle but that didn't seem to help either. I'm using Window Spy to get all the information on the application I can but I am just a bit lost.
If anyone has any help I'd appreciate it!


[Mod edit: Added [code][/code] tags. Please use them yourself when posting code.]
User avatar
boiler
Posts: 17409
Joined: 21 Dec 2014, 02:44

Re: Basic Controlsend help

26 May 2024, 23:56

It may be that this application does not recognize keystrokes sent when the window is not active, as is the case with many applications.
peter_ahk
Posts: 167
Joined: 13 Feb 2024, 14:49

Re: Basic Controlsend help

27 May 2024, 00:43

i wonder if a window moved outside the screen can still be clicked i never tried but if so could be a dirty solution there
tabr3
Posts: 34
Joined: 25 Feb 2024, 04:06

Re: Basic Controlsend help

27 May 2024, 01:30

Code: Select all

SetTitleMatchMode, 2

; Holding right
F3::ControlSend, SunAwtCanvas2, {Right Down}, RuneLite ahk_exe runelite.exe

; Stop holding right
F4::ControlSend, SunAwtCanvas2, {Right up}, RuneLite ahk_exe runelite.exe
Just guessing , rename runelite.exe if it is not like that

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: OvercastBTC, ShatterCoder, wilkster and 140 guests