Can I send a key like that? Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
fona
Posts: 65
Joined: 07 Apr 2022, 06:43

Can I send a key like that?

Post by fona » 27 May 2023, 11:56

Hi everyone,
Let's say I have:
F5::SendInput M

and also:
Enter::
---some code---
SendInput {F5} ;it should send M
---some code---
return


function() could help but maybe there is a much better solution here :)

gregster
Posts: 9002
Joined: 30 Sep 2013, 06:48

Re: Can I send a key like that?  Topic is solved

Post by gregster » 27 May 2023, 12:01

You could use #Inputlevel:

Code: Select all

F5::SendInput M
#Inputlevel 1
F1::
; ...
SendInput {F5}
return
Or gosub, as F5 is also a kind of label:

Code: Select all

F5::SendInput M

F1::
Send w
gosub F5
Return 

fona
Posts: 65
Joined: 07 Apr 2022, 06:43

Re: Can I send a key like that?

Post by fona » 27 May 2023, 12:10

gregster wrote:
27 May 2023, 12:01
You could use #Inputlevel:

Code: Select all

F5::SendInput M
#Inputlevel 1
F1::
; ...
SendInput {F5}
return
Or gosub, as F5 is also a kind of label:

Code: Select all

F5::SendInput M

F1::
Send w
gosub F5
Return 
Wonderful! Thanks a lot

Post Reply

Return to “Ask for Help (v1)”