Kill a process when going to stanby, then... (1 Viewer)

Marbles_00

Portal Member
April 14, 2010
38
2
Hamilton
Home Country
Canada Canada
MediaPortal Version: MP RC1.10
MediaPortal Skin: StreamedMP
Windows Version: WinXP Pro w/SP3
CPU Type: AMD Athlon X2 4800+
HDD: Western Digital 640Gig
Memory: Kingston 2Gig
Motherboard: ASUS M2N-X
Video Card: ASUS EAH4350
Video Card Driver: CCC 9.10
Sound Card: CL 5.1 Live
Sound Card AC3: Analog 5.1
Sound Card Driver: KX Drivers
1. TV Card: Hauppauge 1250
1. TV Card Type: ATSC
1. TV Card Driver:
2. TV Card: Twinhan 1020A
2. TV Card Type: DVB-S
2. TV Card Driver:
3. TV Card:
3. TV Card Type:
3. TV Card Driver:
4. TV Card:
4. TV Card Type:
4. TV Card Driver:
MPEG2 Video Codec: Multiple types depending on source
MPEG2 Audio Codec: Multiple types
h.264 Video Codec: MPC internal decoder
Satelite/CableTV Provider: None - using OTA
HTPC Case: Industrial
Cooling: Zalman CNPS8000
Power Supply: OCZ StealthXtreme 500W
Remote: Panny TV Remote
TV: Panny PT-47X54
TV - HTPC Connection: DVI --> HDMI

Basically I'm using my Hauppauge remote to control MP (started to modify the irremote.ini file, which I will free distribute when done). What I have noticed in the past is that when bringing the system out of standby, it would take a while for the Hauppauge IR software to start recognizing remote commands again. So what I would do when using Xlobby was that I would kill the remote software when going into standby. Upon resume, I had an xlobby command to execute the remote software again. This command was initiated by a script plugin. Now that I'm starting to use MP more, I'm wondering how I can go about this. Anyone have an idea as to where to start?

Thanks in advance.

*EDIT*
Found the Standby Trigger for 0.2.2.0+svn plugin...looks like this may be what I need to use. Has anyone have any experience using this plugin on the most recent MP builds?
 

vecnar

Portal Pro
April 21, 2008
129
10
Home Country
Ireland Ireland
Hi,
I am not using standby trigger plugin so can't recommend.
What i use is simple application "hibernate trigger" (google it) where you just specify what command to run when going to sleep and what command to run on wakeup. In my case i am pointing to batch script. I am running it on windows xp sp3.
 

stounedi

Portal Pro
December 9, 2008
67
1
Hi,
I am not using standby trigger plugin so can't recommend.
What i use is simple application "hibernate trigger" (google it) where you just specify what command to run when going to sleep and what command to run on wakeup. In my case i am pointing to batch script. I am running it on windows xp sp3.

Does this program also run the batch files when system wakes up automatically for example to scheduled recordings?

I am using a different program and it doesnt work. (It doesn't run my batch when the pc wakes up by PowerScheduler, also for some reason it runs the standby batch only one, then never again unless I reboot).
 

Marbles_00

Portal Member
April 14, 2010
38
2
Hamilton
Home Country
Canada Canada
It should work, as it runs when the system resumes from standby, regardless of the method. Pretty good little program, so far it is working wonders.
 

vecnar

Portal Pro
April 21, 2008
129
10
Home Country
Ireland Ireland
I have been running this small program for more than a year and so far never failed.
If you want to run .bat file only when windows resumes than you can use powerscheduler plugin in tv server.

I completely forgot to mention one important thing about hibernate trigger. It works on resume only if you press a button on keyboard or remote and it will not work when tv server wakesup for recording. So for resume use tv server powerscheduler plugin>advanced>click on "..." button and point to file you want to run on wakeup.
 

vecnar

Portal Pro
April 21, 2008
129
10
Home Country
Ireland Ireland
I am writing to update
powerscheduler plugin in tv server can execute batch script or any other program which can receive parameters (suspend and wakeup) from powerscheduler plugin.
I wrote a small batch script with suspend and wakeup parameter and works for me in RC4, haven't tried on earlier versions but you can try.
Just replace commands i use with anything you like. You can also output echoes to a file to make sure that it did perform an action by adding >> and path to file. e.g. echo passed parameter didn't match suspend or wakeup >> c:\test.log






echo off
echo ####################################
echo %time%
echo value passed is %1

if "%1"=="suspend" goto suspend
if "%1"=="wakeup" goto wakeup

echo #####################################
echo passed parameter didn't match suspend or wakeup
exit

:suspend
echo #####################################
echo %time%

rem Place commands below to execute on suspend

"C:\Program Files\IR Server Suite\irblast.exe" -port Port_1 -channel 1~0~0
ping -n 2 localhost
"C:\Program Files\IR Server Suite\irblast.exe" -port Port_1 off.ir

echo suspend parameter has been passed successfully


exit

:wakeup

echo #####################################
echo %time%

rem Place commands below to execute on wakeup

ping -n 7 localhost
"C:\Program Files\IR Server Suite\irblast.exe" -port Port_1 -channel 1~0~0
ping -n 2 localhost
"C:\Program Files\IR Server Suite\irblast.exe" -port Port_1 off.ir

echo wakeup parameter has been passed successfully


exit
 

Users who are viewing this thread

Top Bottom