Automatically close XBMC on sleep
#1
Hi,

Anyone know of a good trick for automatically closing XBMC when the computer is put to sleep? I'm using Windows 7.

I want to do this as my family keep sleeping the machine and then starting Media Center on wake and if both are running videos stutter.

Some sort of sleep script perhaps?

Cheers.
Reply
#2
xbmclauncher has this function.
Reply
#3
If you don't need all the functionality of xbmclauncher, then just create an autohotkey script (Install autohotkey, right click desktop > new autohotkey script. Edit in notepad, save and double click to run.)

WM_POWERBROADCAST(wParam, lParam)

{
If (wParam=4) ;suspend
Process, Exist, xbmc.exe ; check to see if xbmc.exe is running
If (ErrorLevel > 0) ; If it is running
Process, Close, %ErrorLevel%

}

Move this script to your startup folder.
Reply
#4
Perfect! Thanks.
Reply

Logout Mark Read Team Forum Stats Members Help
Automatically close XBMC on sleep0