In my script I have a hotkey that launches Chrome and YouTube TV in kiosk mode as well as a tiny program from Steam called "Controller Companion", which gives me control with my XBOX controller. That part works fine, everything loads as it should. It is when exiting the script, Controller Companion refuses to close, Chrome closes as it should but CC is steadfast in running in the system tray. I have tried winkill, process,close and winclose with the ahk_exe process name but it will not terminate CC. It is not a program that runs as a service and I can close it from task manager as well as right-clicking>close on the system tray icon.
Window Spy provides the following information:
Code: Select all
ahk_class HwndWrapper[ControllerCompanion.exe;;20b9cbd1-bce2-4c31-abf3-c5e67ee37b9b]
ahk_exe ControllerCompanion.exe
ahk_pid 31016
Currently I am just testing on a single ahk script that I double-click, this is my current attempt (not my only though):
Code: Select all
if WinExist (ahk_exe ControllerCompanion.exe)
winclose
exitapp