For your task, I only know an easy workaround solution.
You just need a small Gui then you can work with #IfWinExist
That means you always have to start this gui when you log in or you put this gui-program into your personal autostart-folder.
Code: Select all
#IfWinExist MyUnvisibleGui
F7::
msgbox Hello Gui
return
#If