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.

Coding Help for Resume.Automatic

Do you have questions about writing plugins or scripts in Python? Meet the coders here.
Post Reply
AnderB
Posts: 3
Joined: Fri Mar 30, 2012 5:57 pm

Coding Help for Resume.Automatic

Post by AnderB »

Hey all,

I've been having a hard time implementing this script I found that seems like it should do what I want.

Win 7 x64, administrator account and UAC turned off, Eventghost V1544. User folders (including appdata) on a different drive (M:/).

I use USB-UIRT to turn my TV/Reciever on/off on standby (S3)/resume events, but obviously they turn on when the system resumes to record or backup. I'd like to keep this from happening. I thought I had it sorted out with events system.resume and system.resume.automatic but for some reason it was hit or miss. Anyhow; when I try to implement the following code

Code: Select all

<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1486">
    <Action>
        EventGhost.PythonScript(u"import os\n\nprint os.popen('powercfg -lastwake > c:\\\\temp.txt').read()")
    </Action>
</EventGhost>
Eventghost pops out
Error in Action: "PythonScript".
Traceback (most recent call last) (1544):
TypeError: 'Nonetype' object is not callable


I picked this up from here http://www.eventghost.org/forum/viewtop ... f=2&t=3154

Of course all help appreciated.
Brian
Post Reply