Control key = ok, F Keys, not so much

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ryder
Posts: 61
Joined: 28 Apr 2022, 18:49

Control key = ok, F Keys, not so much

Post by Ryder » 19 Aug 2022, 11:23

Hi all... I have a couple lines of code sending some keys to a control.

The first works, the other does not.

ideas?

Code: Select all

^p:: ControlSend,,^p, %MainTitle%	  ;Works

F2:: ControlSend,,{F2}, %MainTitle%		;No workey
Thanks for your kind help!

R

User avatar
mikeyww
Posts: 26937
Joined: 09 Sep 2014, 18:38

Re: Control key = ok, F Keys, not so much

Post by mikeyww » 19 Aug 2022, 12:38

Ideas:

1. Use the hook. https://www.autohotkey.com/docs/Hotkeys.htm#prefixdollar
2. Use ahk_parent as the control name.
3. Activate the target window, and use Send instead of ControlSend.

Ryder
Posts: 61
Joined: 28 Apr 2022, 18:49

Re: Control key = ok, F Keys, not so much

Post by Ryder » 19 Aug 2022, 13:06

mikeyww wrote:
19 Aug 2022, 12:38

1. Use the hook. https://www.autohotkey.com/docs/Hotkeys.htm#prefixdollar

3. Activate the target window, and use Send instead of ControlSend.
Ha! It worked!

Actually, it took a combination of doing both #1 and #3

*Thank you so much!* :dance:

Post Reply

Return to “Ask for Help (v1)”