Thanks in advance for the attention.
I'm trying to get a script to send a Hotkey to another script, but apparently this listener script has K-hook hotkeys according to the script debug. I tried using #UseHook Off and changing the hotkeys (F6, F7 and F8) - F7 calls a sub - to single letters but it still shows as k-hook on the debug. The only way to remove K-hook is removing #IfWinActive from the start of the script. This line is not 100% necessary for the script but i'd still like to have it on to prevent mayhem happening with the keypresses my script sends. Also, I am unable to make the script run without a hotkey because #Warn tells me the returns and exitapps keep getting in the way.
Here are the test scripts I used. On this first one just change the ";" between lines 15 and 16 to alternate the errors I get. Adding it to line 10 make its hotkey work with the second script's input.
Here's script 1:
Code: Select all
#NoEnv
#Warn
Process, priority, , high
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 2
#MaxThreadsperHotkey 2
SetBatchLines, -1
WinActivate SciTE
#IfWinActive, SciTE
#UseHook Off
F6::reload
F8::ExitApp
;F7::Gosub main
Gosub main
main:
ToolTip F7 hotkey worked!
SetTimer, RemoveTooltip, -2000
return
RemoveToolTip:
ToolTip
return
Code: Select all
#NoEnv
#Warn
SendMode Input
SetWorkingDir %A_ScriptDir%
SetTitleMatchMode, 2
#MaxThreadsperHotkey 2
Send, {F7 down}
Sleep, 50
Send, {F7 up}
return
Also, does anyone know how I am erring running this script without a hotkey?
Thanks again,
Best wishes.