Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
Event on monitor standby?
Event on monitor standby?
Is there a way to make EventGhost to create an event when Windows put the monitor to sleep
and when the opposite happens?
Thanks in advance!
and when the opposite happens?
Thanks in advance!
-
eventspook
- Posts: 23
- Joined: Tue Mar 05, 2013 2:50 pm
Re: Event on monitor standby?
I would like to kick off an event in this scenario as well (and when someone turns the monitor on/off). Hoping this is possible.
-
themaster1
- Experienced User
- Posts: 133
- Joined: Wed Feb 03, 2010 9:02 pm
Re: Event on monitor standby?
2 events you can use:
System.Suspend for hibernation
System.Resume for back from hibernation
For sleep i don't know precisely probably System.Sleep ..to be confirmed?
System.Suspend for hibernation
System.Resume for back from hibernation
For sleep i don't know precisely probably System.Sleep ..to be confirmed?
Re: Event on monitor standby?
Thank you for your response.
Those events you describe seem to be system-wide.
I am *NOT* talking about putting Windows in stand-by,
but instead I am trying to detect when Windows put the monitor(s) in energy-saving mode.
I don't see any event been generated at the log when that happens,
so I guess I need to get a plugin or something?
Those events you describe seem to be system-wide.
I am *NOT* talking about putting Windows in stand-by,
but instead I am trying to detect when Windows put the monitor(s) in energy-saving mode.
I don't see any event been generated at the log when that happens,
so I guess I need to get a plugin or something?
Re: Event on monitor standby?
viewtopic.php?f=2&t=5196#p25336 might be an option.
What are you looking to do when the monitor sleeps?
What are you looking to do when the monitor sleeps?
-
eventspook
- Posts: 23
- Joined: Tue Mar 05, 2013 2:50 pm
Re: Event on monitor standby?
Personally, I want to activate the cameras in my office when the screen is turned off. I am doing this with the SessionLock method, but would like to control this with the power state of the monitors.
Re: Event on monitor standby?
I want to start/stop a CPU intensive background program when my PC idles (and stop it when I am back).
Unfortunately I can't use the idle event, because it fires up even when I am watching a movie.
The thread you referred, requires controlling monitor sleep status from EG instead of Windows.
That stumbles on the same problem: It might put monitor to sleep, when it shouldn't (watching movie).
I've also thought of checking if media player software is active (XBMC in my case).
Problem with that approach is that sometimes XBMC is running, but not showing anything
(so monitor again goes automatically to sleep and I want to fire up that background application again).
I've even tried to use screensaver to do that thing, but Windows 7 shuts down the screensaver once it's time for the monitor power saving state to kick-in.
Unfortunately I can't use the idle event, because it fires up even when I am watching a movie.
The thread you referred, requires controlling monitor sleep status from EG instead of Windows.
That stumbles on the same problem: It might put monitor to sleep, when it shouldn't (watching movie).
I've also thought of checking if media player software is active (XBMC in my case).
Problem with that approach is that sometimes XBMC is running, but not showing anything
(so monitor again goes automatically to sleep and I want to fire up that background application again).
I've even tried to use screensaver to do that thing, but Windows 7 shuts down the screensaver once it's time for the monitor power saving state to kick-in.
Re: Event on monitor standby?
I can't help with the other stuff. But you can get an event from XBMC when its builtin screensaver activates using the test version of my XBMC2 plugin, instructions how to activate events here. You can also get information if somethings playing.Saxtus wrote:I've also thought of checking if media player software is active (XBMC in my case).
Problem with that approach is that sometimes XBMC is running, but not showing anything
(so monitor again goes automatically to sleep and I want to fire up that background application again).
jonib
Re: Event on monitor standby?
As Jonib says, his plugin is great for that.Saxtus wrote: I've also thought of checking if media player software is active (XBMC in my case).
Problem with that approach is that sometimes XBMC is running, but not showing anything
Here's how I get around that problem below. I don't want my monitor going to sleep when winamp is playing because I use HDMI audio and windows thinks of it as a second monitor. When the monitor is disabled the sound stops, so this fixes that.I've even tried to use screensaver to do that thing, but Windows 7 shuts down the screensaver once it's time for the monitor power saving state to kick-in.
- Attachments
-
- monitor sleep.xml
- (4.35 KiB) Downloaded 196 times
Re: Event on monitor standby?
Thank you all for your contributions towards a solution for my problem!
jonib's proposal is the most elegant around and usable in my case so far:

Then I use an if-then python script to stop the execution of the idle macro:
jonib's proposal is the most elegant around and usable in my case so far:

Then I use an if-then python script to stop the execution of the idle macro:
Code: Select all
if eg.globals.playing > 0:
print "Idle but playing -- Skippping"
eg.StopMacro()Re: Event on monitor standby?
Saxtus wrote:jonib's proposal is the most elegant around and usable in my case so far:
An alternative is to use XBMC2\Experimental\JSONRPC.Player.GetActivePlayers to get an playerid if something is playing in XBMC. Don't know if it better just one more option.Then I use an if-then python script to stop the execution of the idle macro:Code: Select all
if eg.globals.playing > 0: print "Idle but playing -- Skippping" eg.StopMacro()
jonib
Re: Event on monitor standby?
GetActivePlayers gives a player as active even when paused?
Re: Event on monitor standby?
Ah, I see.
Then doesn't suit my case.
Still thanks a lot!
Then doesn't suit my case.
Still thanks a lot!
Re: Event on monitor standby?
Hmm, so you wanna play tough eh.Saxtus wrote:Ah, I see.
If there is an active player you can then test if it's paused with XBMC2\Experimental\JSONRPC.Player.GetProperties for "speed"=0 paused or "speed">=1 playing.Then doesn't suit my case.
jonib
Edit: @Saxtus, Thanks for the Flattr. You doubled my Flattr count yay.
