2013-05-24, 10:49
In windows 8 x64 with xbmc launcher as shell. The code is working, after it was compiled and set to run as administrator when xbmc runs. Is it possible to incorporate it into xbmc launcher itself.
Code:
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%
Process, WaitClose, %ErrorLevel%
sleep 1000
}
}
If (wParam=7) ;on resuming from suspend state
Run,C:\Program Files\XBMC\XBMC.exe
}