Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Not responding to graceful termination signal (Read 1204 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Not responding to graceful termination signal

I'm trying to shut it down at night, programming through AutoHotkey.
I can't for the life of me figure out a termination signal to send that works reliably but doesn't force.

Code: [Select]
WinClose, ahk_exe foobar2000.exe ; Doesn't work if minimized
PostMessage, 0x112, 0xF060,,, ahk_exe foobar2000.exe ; Doesn't work if minimized
Run, taskkill /t /im foobar2000.exe, , Hide ; Doesn't work if minimized

I could handle it as a special case with foobar2000.lnk /pause /exit but I was hoping for a more reliable general solution.
What is holding it back from behaving normally? Is it some kind of play lock because it's a media player?

 

Re: Not responding to graceful termination signal

Reply #1
Your authotkey hackery closes foobar2000 just fine here when it's minized. But if it's hidden so it only shows up in notification area it no longer works. But nothing that lives in notification area can be closed with your command.

I'd assume what you want to achieve can be achieved with foo_scheduler. But cleanest way to achieve closing of foobar2000 at specific time is to use Windows' Task Scheduler and call foobar2000.exe /quit.