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)
How do I send a text Hotkey to a Notepad++ window
How do I send a text Hotkey to a Notepad++ window
Last edited by jwinfl on 17 Sep 2018, 06:09, edited 1 time in total.
Re: How do I send a text Hotkey to a Notepad++ window
Why don’t you send the text of the hotstring directly ?
ciao
toralf
toralf
Re: How do I send a text Hotkey to a Notepad++ window
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
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
Re: How do I send a text Hotkey to a Notepad++ window
Don’t know if you have found a solution by now. It just came to my mind that you could use the hot string also as a label. Hence your hotkey could use GoSub qqhdg to call it.
ciao
toralf
toralf
Re: How do I send a text Hotkey to a Notepad++ window
Not sure if this is what you want, but take a look at SendLevel. It has an example that triggers a hotstring via Send.