How do I send a text Hotkey to a Notepad++ window

Get help with using AutoHotkey and its commands and hotkeys
jwinfl
Posts: 29
Joined: 16 Aug 2017, 12:37

How do I send a text Hotkey to a Notepad++ window

16 Sep 2018, 07:51

I have a text hot key ::qqhdg:: that sends a heading (several lines of text) to the active window.

The script I am writing opens a new Notepad++ window and then sends qqhdg space to the new window.

The hotkey's text gets sent ok but it does not execute the hot key ::qqhdg:: which would send the heading lines to the window.

If I type qqhdg followed by a space into the same Notepad++ window, it activates the script and sends several lines of text to the window.

How do I get my AHK script to send the hot key to the new Notepad++ window so it actually activates the hot key?

Send and SendInput both send the text but neither activates the hotkey.

Any help will be greatly appreciated.

My System Specs...
Windows 10 x64 (Latest Updates)
Intel Core i7-920 2.66ghz CPU
12gb DDR3 1600 Triple Chanel Memory
AMD Radeon HD 7850 2GB 256bit GDDR5 Memory Graphics Card
Hisense 49" 4K Monitor (3840x2180)
Last edited by jwinfl on 17 Sep 2018, 06:09, edited 1 time in total.
toralf
Posts: 511
Joined: 27 Apr 2014, 21:08
Location: Germany

Re: How do I send a text Hotkey to a Notepad++ window

16 Sep 2018, 10:39

Why don’t you send the text of the hotstring directly ?
ciao
toralf
jwinfl
Posts: 29
Joined: 16 Aug 2017, 12:37

Re: How do I send a text Hotkey to a Notepad++ window

17 Sep 2018, 06:09

Toralf,

Unfortunately the hotkey is not just text, the script and text change often, it is long and it is used in several other scripts.

Most importantly there must be an easy way to execute a hotkey (text) from another AHK script.

I could also make it a function, etc. but I would prefer to somehow send text to a window that both Windows and AHK would treat the same as if I typed it into the window myself.

I have several other scripts that require a similar ability to run a AHK text hotkey.

Thank you for your reply.

JWINFL

Return to “Ask For Help”

Who is online

Users browsing this forum: ahketype, Boxof, kadhri, roysubs and 115 guests