[Message Prev][Message
Next][Thread Prev][Thread Next][Message
Index][Thread Index]
Re: Re: HomeAutomator and xPL
- Subject: Re: Re: HomeAutomator and xPL
- From: John B
- Date: Thu, 15 Jan 2004 19:05:00 +0000
Hi Graham,
This should get you going:
Download <a href="http://www.xpl.myby.co.uk/downloads/squtil/squtil.dll">http://www.xpl.myby.co.uk/downloads/squtil/squtil.dll</a>
and place it in
your Windows system directory.
Then download <a href="http://www.xpl.myby.co.uk/downloads/aspsock/aspsocket.dll">http://www.xpl.myby.co.uk/downloads/aspsock/aspsocket.dll</a>
and
again place it in your Windows system directory.
Click Start -> RUn, and type:
regsvr32 aspsocket.dll
You should get a message saying the DLL registered successfully.
Now, in your ASP code, you can use something like:
dim myAspSock
set myAspSock = Server.CreateObject("aspSocket.Socket")
dim XplMsg
XplMsg = "xpl-cmnd" & vbLf & _
"{" & vbLf & _
"hop=1" & vbLf & _
"source=johnb-tester.test" & vbLf & _
"target=*" & vbLf & _
"}" & vbLf & _
"tts.basic" & vbLf & _
"{" & vbLf & _
"speech=Hello world" & vbLf & _
"}" & vbLf
myaspSock.SendUDPPacket "255.255.255.255", 3865, cstr(XplMsg),
len(XplMsg)
The above example sends a TTS message that says "Hello world".
It's worked flawlessly for me (and Tony) for a year now, and it doesn't
rely on
the Microsoft Winsock control, which I've previously had problems with when
running under IIS.
Unfortunately, you don't get the handy way of just passing 4 parameters
like you
get with Tony's OCX, instead you have to craft the message by hand.
I can always add a new method to the aspSocket control that just accepts
type,
source, target, schema and body if people would find this useful.
Regards,
John
xPL Main Index |
xPL Thread Index |
xPL Home |
Archives Home
|