Open alshain opened 6 years ago
Could you have a screenshot of the output channel?
Stopping an autohotkey script works for me.
Environment: VSCode: 1.22.2 Code Runner: 0.9.3 AutoHotkey: 1.1.28.00 Windows 10 Version 1709 (OS Build 16299.371)
Example:
test.ahk
containing:
F8::msgbox, test
Ctrl+Alt+n
to run the script:
the VSCode OUTPUT panel shows: [Running] autohotkey "c:\temp\test.ahk"
and the Windows system tray, shows a new autohotkey H
icon, indicating that the script is running.F8
to show a message box with the text test
.Esc
to close the message box.Ctrl+Alt+m
to stop the script,
the OUTPUT panel shows: [Done] exited with code=1 in 5.1 seconds
and pressing F8
doesn't show the message box anymore.The H
icon is still visible in the system tray, but moving the mouse pointer over the icon, removes it. This isn't a Code Runner issue. Because I've seen it happen a couple of times over the years while using autohotkey. And a quick search found at least two autohotkey forum threads about it:
https://autohotkey.com/board/topic/75189-system-tray-icon-stays-even-after-script-stops/
https://autohotkey.com/board/topic/7407-kill-process-and-tray-icon-possible/
A comment in the second thread seem to indicate, that it might be Windows that doesn't know that the script has been been (force?) closed.
well it's the same behaviour, if you kill the thread with taskmanager. The Explorer doesn't recognize, that the tread had died.
source: https://autohotkey.com/board/topic/7407-kill-process-and-tray-icon-possible/#entry45489
Starting an autohotkey script works perfectly.
However, it keeps on running until I manually close it via the systray icon. It doesn't matter whether I use the shortcut or choose the action from the command palette.