formulahendry / vscode-code-runner

Code Runner for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=formulahendry.code-runner
MIT License
2.18k stars 291 forks source link

"Stop Code Run" doesn't do anything for Autohotkey scripts #297

Open alshain opened 6 years ago

alshain commented 6 years ago

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.

formulahendry commented 6 years ago

Could you have a screenshot of the output channel?

duianto commented 6 years ago

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:

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