disable screensaver for script run time

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
pru1 Offline
Junior Member
Posts: 34
Joined: Feb 2011
Reputation: 0
Post: #1
How can I disable the screensaver (dim in my case) to activate when my python script is active?
If there is no way to do this, how can I send the keypress to the script when the screensaver is active? I want to avoid pressing the remote key twice, first to wake up from screensaver, then second time to send it to the script.
find quote
giftie Offline
Skilled Python Coder
Posts: 2,363
Joined: Mar 2010
Reputation: 54
Location: Calgary, Alberta
Post: #2
pru1 Wrote:How can I disable the screensaver (dim in my case) to activate when my python script is active?
If there is no way to do this, how can I send the keypress to the script when the screensaver is active? I want to avoid pressing the remote key twice, first to wake up from screensaver, then second time to send it to the script.

you can use executehttpapi to do this..

first you might want to get what it your current screen saver:
Code:
screensaver = xbmc.executehttpapi( "GetGUISetting(3;screensaver.mode)" ).replace( "<li>", "" )

then to turn off:
Code:
xbmc.executehttpapi( "SetGUISetting(3,screensaver.mode,None)" )

to turn back on:
Code:
xbmc.executehttpapi( "SetGUISetting(3,screensaver.mode,%s)" % screensaver )

[Image: e4f63e45ba34fe4695b3bb08eb2499d8e4ee484e...4c076g.jpg]
For troubleshooting and bug reporting please make sure you read this first you can also use XBMC Log Uploader Script.
Cinema Experience
Cinema Experience Wiki
cdART Manager
fanart.tv


find quote
pru1 Offline
Junior Member
Posts: 34
Joined: Feb 2011
Reputation: 0
Post: #3
Thanks, it does the job with the screensaver.
However after the idle time (when normally screensaver would start) I still have to press any remote key to take the xbmc out from an inactive state.
Can I avoid it entering this state at all?
find quote
bossanova808 Offline
Donor
Posts: 2,228
Joined: Sep 2009
Reputation: 34
Location: Melbourne, Australia
Post: #4
I have tried the above code and while it appears to work, it causes my Addon (XSqueeze) to hang on exit (when I re-enable the screensaver).

Any ideas or alternate methods??
http://forum.xbmc.org/showthread.php?p=1012231

My XBMC stuff:
find quote