need help her writing very simple Python script for USB-uirt
Posted: Thu Jul 31, 2014 7:04 pm
I am trying to learn how to do Python scripts, but I cannot find any tutorial. What I am trying to do is quite simple. I'm trying to execute a series of actions for my satellite DVR receiver with USB-uirt. Here are the actions in my macro:
satellite down arrow
wait .5 seconds
satellite delete
I copied and pasted these individual actions into my script, but it's not working. Here is the script:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1610">
<Action Name="satellite down arrow">
USB_UIRT.TransmitIR(u'0000 006C 0022 0002 0158 00AD 0015 0016 0016 0016 0015 0017 0015 0016 0016 0016 0015 0017 0015 0041 0015 0017 0015 0016 0016 0016 0015 0017 0015 0016 0016 0016 0015 0017 0015 0041 0015 0017 0015 0016 0016 0041 0015 0041 0015 0041 0016 0016 0015 0017 0015 0016 0016 0016 0015 0041 0016 0016 0015 0017 0015 0016 0016 0041 0015 0041 0015 0041 0016 0041 0015 171B 0158 0056 0016 171B', 4, 0)
</Action>
<Action>
EventGhost.Wait(0.5)
</Action>
<Action Name="satellite delete">
USB_UIRT.TransmitIR(u'0000 006E 0022 0002 0153 00AA 0015 0015 0016 0015 0015 0016 0015 0015 0016 0015 \n\n0015 0016 0015 0040 0015 0016 0015 0015 0016 0015 0015 0016 0015 0015 0016 0015 \n\n0015 0016 0015 0040 0015 0016 0015 0040 0015 0016 0015 0015 0016 0040 0015 0040 \n\n0015 0016 0015 0015 0016 0015 0015 0016 0015 0040 0015 0040 0016 0015 0015 0016 \n\n0015 0040 0015 0040 0016 0040 0015 06DC 0153 0055 0016 06DC', 4, 0)
</Action>
</EventGhost>
The error I get in the event log says:
Error compiling script.
Traceback (most recent call last):
SyntaxError: invalid syntax (3, line 1)
Any suggestions on what I'm doing wrong here?
satellite down arrow
wait .5 seconds
satellite delete
I copied and pasted these individual actions into my script, but it's not working. Here is the script:
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1610">
<Action Name="satellite down arrow">
USB_UIRT.TransmitIR(u'0000 006C 0022 0002 0158 00AD 0015 0016 0016 0016 0015 0017 0015 0016 0016 0016 0015 0017 0015 0041 0015 0017 0015 0016 0016 0016 0015 0017 0015 0016 0016 0016 0015 0017 0015 0041 0015 0017 0015 0016 0016 0041 0015 0041 0015 0041 0016 0016 0015 0017 0015 0016 0016 0016 0015 0041 0016 0016 0015 0017 0015 0016 0016 0041 0015 0041 0015 0041 0016 0041 0015 171B 0158 0056 0016 171B', 4, 0)
</Action>
<Action>
EventGhost.Wait(0.5)
</Action>
<Action Name="satellite delete">
USB_UIRT.TransmitIR(u'0000 006E 0022 0002 0153 00AA 0015 0015 0016 0015 0015 0016 0015 0015 0016 0015 \n\n0015 0016 0015 0040 0015 0016 0015 0015 0016 0015 0015 0016 0015 0015 0016 0015 \n\n0015 0016 0015 0040 0015 0016 0015 0040 0015 0016 0015 0015 0016 0040 0015 0040 \n\n0015 0016 0015 0015 0016 0015 0015 0016 0015 0040 0015 0040 0016 0015 0015 0016 \n\n0015 0040 0015 0040 0016 0040 0015 06DC 0153 0055 0016 06DC', 4, 0)
</Action>
</EventGhost>
The error I get in the event log says:
Error compiling script.
Traceback (most recent call last):
SyntaxError: invalid syntax (3, line 1)
Any suggestions on what I'm doing wrong here?