[Message Prev][Message
Next][Thread Prev][Thread Next][Message Index][Thread Index]
RE: Digiguide?
- Subject: RE: Digiguide?
- From: "Ian B" <ian.bird@xxxxxxxxx>
- Date: Sun, 31 Oct 2004 19:08:28 -0000
------=_NextPart_000_000A_01C4BF7D.012D4DE0
Content-Type: text/plain;
charset="US-ASCII"
Content-Transfer-Encoding: 7bit
MessageThanks Edward
I have to get a lot further but this looks good along with James stuff
Ian
-----Original Message-----
From: Edward Pearson [mailto:edward.mailgroup@xxxxxxx]
Sent: 31 October 2004 16:55
To: xap_automation@xxxxxxx
Subject: RE: [xap_automation] Digiguide?
I use DigiGuide and xAP to change channel on my TV. There's a simple
scripting plugin for DigiGuide that lets you call a vbscript or jscript.
This is handy because it means you don't have to mess with the DigiGuide
API
just use simple script.
The script plugin .ini file lets you add events and context menu items. I
just use a 'change channel' menu item on the channel bar. I compose the xAP
messages in vbscript and then shell out to Stuart B's xAP send utility. xAP
messages are picked up by Stuart's RedRat connector. I run digiguide on a
laptop that's generally lives on the coffe table - the red rat is on
another
PC which feeds into my wired IR distribution.
The Digiguide scripting plugin (DG script) is at:
http://freespace.virgin.net/julian.cable/DGscript.html
The send program, red rat connector etc are at:
www.xapframework.net
My script is pasted below. I have a line in the scripting.ini fle to call
it from the channel menu:
[ChannelMenu]
Menu0=Select channel on Sky box
Edward
======================
Const ForReading = 1, ForWriting = 2, ForAppending = 8
Dim argv, chanNo, digits, i, digit
Dim fso, f, shell, network, host
Set argv = WScript.Arguments
Set fso = CreateObject("Scripting.FileSystemObject")
Set shell = WScript.CreateObject("WScript.Shell")
Set f = fso.OpenTextFile("tune.xap", ForWriting, True)
Set network = WScript.CreateObject("WScript.Network")
host = lcase(network.ComputerName)
chanNo = argv(1)
digits = len(chanNo)
StartXAPScript f
for i = 1 to digits
digit = mid(chanNo, i, 1)
WriteXAPScriptBody f, "Sky+", CStr(digit)
next
EndXAPScript f
shell.Run "tune.xap", 2, true
fso.DeleteFile("tune.xap")
Sub StartXAPScript(f)
f.writeline "xap-header"
f.writeline "{"
f.writeline " v=12"
f.writeline " hop=1"
f.writeline " uid=FF123400"
f.writeline " class=IR.Transmit"
f.writeline " source=ersp.digiGuide." + host
f.writeline "}"
End Sub
Sub WriteXAPScriptBody(f, device, signal)
f.writeline "IR.Signal"
f.writeline "{"
f.writeline " device=" + device
f.writeline " signal=" + signal
f.writeline "}"
End Sub
Sub EndXAPScript(f)
f.Close
End Sub
------=_NextPart_000_000A_01C4BF7D.012D4DE0
Content-Type: text/html; charset=US-ASCII
Content-Transfer-Encoding: 7bit
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN">
<HTML><HEAD><TITLE>Message</TITLE>
<META http-equiv=Content-Type content="text/html;
charset=us-ascii">
<META content="MSHTML 6.00.2800.1476"
name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=690520619-31102004><FONT face=Arial
color=#0000ff size=2>Thanks
Edward</FONT></SPAN></DIV>
<DIV><SPAN class=690520619-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=690520619-31102004><FONT face=Arial
color=#0000ff size=2>I have
to get a lot further but this looks good along with James
stuff</FONT></SPAN></DIV>
<DIV><SPAN class=690520619-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=690520619-31102004><FONT face=Arial
color=#0000ff
size=2>Ian</FONT></SPAN></DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #0000ff 2px
solid; MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader dir=ltr align=left><FONT
face=Tahoma
size=2>-----Original Message-----<BR><B>From:</B>
Edward Pearson
[mailto:edward.mailgroup@xxxxxxx]<BR><B>Sent:</B>
31 October 2004
16:55<BR><B>To:</B>
xap_automation@xxxxxxx<BR><B>Subject:</B> RE:
[xap_automation] Digiguide?<BR><BR></FONT></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>I
use DigiGuide and xAP to change channel on my TV. There's a simple
scripting
plugin for DigiGuide that lets you call a vbscript or jscript. This is
handy
because it means you don't have to mess with the DigiGuide API
just use
simple script.</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>The
script plugin .ini file lets you add events and context menu items. I just
use a 'change channel' menu item on the channel bar.
</FONT></SPAN><SPAN
class=679124216-31102004><FONT face=Arial color=#0000ff size=2>I
compose the
xAP messages in vbscript and then shell out to Stuart B's xAP send utility.
xAP messages are picked up by Stuart's RedRat connector. I run digiguide on
a
laptop that's generally lives on the coffe table - the red rat is on
another
PC which feeds into my wired IR
distribution.</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>The
Digiguide scripting plugin (DG script) is
at:</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2><A
href="http://freespace.virgin.net/julian.cable/DGscript.html">http://freespace.virgin.net/julian.cable/DGscript.html</A></FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>The
send program, red rat connector etc are
at:</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2><A
href="http://www.xapframework.net">www.xapframework.net</A></FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>My
script is pasted below. I have a line in the scripting.ini fle to call it
from
the channel menu:</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>[ChannelMenu]<BR>Menu0=Select channel on Sky
box</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>Edward</FONT></SPAN></DIV>
<DIV><SPAN
class=679124216-31102004></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>======================</FONT></SPAN></DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>Const ForReading = 1, ForWriting = 2, ForAppending =
8<BR>Dim argv,
chanNo, digits, i, digit<BR>Dim fso, f, shell, network,
host</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>Set
argv = WScript.Arguments<BR>Set fso =
CreateObject("Scripting.FileSystemObject")<BR>Set shell =
WScript.CreateObject("WScript.Shell")<BR>Set f =
fso.OpenTextFile("tune.xap",
ForWriting, True)<BR>Set network =
WScript.CreateObject("WScript.Network")</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>host
= lcase(network.ComputerName)</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>chanNo = argv(1)</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>digits = len(chanNo)</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>StartXAPScript f</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>for
i = 1 to digits<BR> digit = mid(chanNo, i,
1)<BR> WriteXAPScriptBody
f, "Sky+",
CStr(digit)<BR>next</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>EndXAPScript f</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>shell.Run "tune.xap", 2,
true</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2>fso.DeleteFile("tune.xap")</FONT></SPAN></DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff
size=2></FONT></SPAN> </DIV>
<DIV> </DIV>
<DIV><SPAN class=679124216-31102004><FONT face=Arial
color=#0000ff size=2>Sub
StartXAPScript(f)<BR> f.writeline
"xap-header"<BR> f.writeline
"{"<BR> f.writeline
"
v=12"<BR> f.writeline
"
hop=1"<BR> f.writeline
"
uid=FF123400"<BR> f.writeline
"
class=IR.Transmit"<BR> f.writeline
"
source=ersp.digiGuide." + host<BR> f.writeline
"}"<BR>End
Sub</FONT></SPAN></DIV>
<DIV> </DIV><SPAN
class=679124216-31102004><FONT face=Arial color=#0000ff
size=2>
<DIV><BR>Sub WriteXAPScriptBody(f, device,
signal)<BR> f.writeline
"IR.Signal"<BR> f.writeline
"{"<BR> f.writeline
"
device=" + device<BR> f.writeline
" signal=" +
signal<BR> f.writeline "}"<BR>End
Sub</DIV>
<DIV> </DIV>
<DIV><BR>Sub
EndXAPScript(f)<BR> f.Close<BR>End
Sub</FONT></SPAN></DIV></BLOCKQUOTE>
<br>
<!-- **begin egp html banner** -->
<table border=0 cellspacing=0 cellpadding=2>
<tr bgcolor=#FFFFCC>
<td align=center><font size="-1"
color=#003399><b>Yahoo! Groups
Sponsor</b></font></td>
</tr>
<tr bgcolor=#FFFFFF>
<td align=center width=470><table border=0 cellpadding=0
cellspacing=0> <tr> <td align=center><font face=arial
size=-2>ADVERTISEMENT</font><br><a href="http://us.ard.yahoo.com/SIG=129a9l1cf/M=315388.5543473.6613715.3001176/D=groups/S=1705007709:HM/EXP=1099336115/A=2372354/R=0/SIG=12id813k2/*https://www.orchardbank.com/hcs/hcsapplication?pf=PLApply&media=EMYHNL40F21004SS"
alt=""><img src="http://us.a1.yimg.com/us.yimg.com/a/ho/household/f2_free2_300x250_def_0904.gif"
alt="click here" width="300" height="250"
border="0"></a></td></t
r></table> </td>
</tr>
<tr><td><img alt="" width=1 height=1 src="http://us.adserver.yahoo.com/l?M=315388.5543473.6613715.3001176/D=groups/S=:HM/A=2372354/rand=123382393"></td></tr>
</table>
<!-- **end egp html banner** -->
<!-- **begin egp html banner** -->
<br>
<tt><hr width="500">
<b>Yahoo! Groups Links</b><br>
<ul>
<li>To visit your group on the web, go to:<br><a
href="http://groups.yahoo.com/group/xap_automation/">http://groups.yahoo.com/group/xap_automation/</a><br>
<li>To unsubscribe from this group, send an email to:<br><a
href="mailto:xap_automation-unsubscribe@xxxxxxx?subject=Unsubscribe">xap_automation-unsubscribe@xxxxxxx</a><br>
<li>Your use of Yahoo! Groups is subject to the <a href="http://docs.yahoo.com/info/terms/">Yahoo!
Terms of Service</a>.
</ul>
</tt>
</br>
<!-- **end egp html banner** -->
</BODY></HTML>
------=_NextPart_000_000A_01C4BF7D.012D4DE0--
xAP_Automation Main Index |
xAP_Automation Thread Index |
xAP_Automation Home |
Archives Home
|