I am not a programmer but I got this thing to work.. I have a win2003 server with a caller ID modem using YAC.. There is a script which makes Yac speak the caller ID. I simply modified the .VBS file.. VBSCRIPT.. And then I send Caller ID using the message feature in XBMC ( so you need to enable HTTP web stuff on XBMC )
1) Install Yac
2) Replace Yac with modified Yac Ver .17 & scripts
http://mattcollinge.wordpress.com/2007/0...using-yac/
3) Download and put "wget.exe" inside same directory ( it's a dos http thing )
I think this one, I forget the copy I have so if the switches in the script don't match, then change the commands
http://users.ugent.be/~bpuype/wget/
4) I had to remove spaces from the data and replace with %20 as you can see..
5) change your .vbs file to this ( its a mess and a lot is garbage, I didnt clean it up ) but it does work.. and you can figure out what the stuff does.. I send the ID to 4 computers in this script.. I Noticed when I posted this that the spaces and everything is messed up in the post.. SO USE THE INFO BELOW AS A TEMPLATE!! And copy paste into the original script ( make backup).. Anything with a 'is just info... So you can ignore it..
' --------------------------------------------------------
' Matt Collinge ::
http://www.mattcollinge.co.uk :: 17 April 2007
' --------------------------------------------------------
' Take an incoming call from YAC and use the default voice
' to speak it back to the user.
' --------------------------------------------------------
Dim voic
Dim message
Dim messagePrefix
' Clean out any non-numbers
Function CleanTheString(theString, theReplacement, theCharSeparator)
'msgbox thestring
strAlphaNumeric = "0123456789" 'Used to check for numeric characters.
For i = 1 to len(theString)
strChar = mid(theString,i,1)
If instr(strAlphaNumeric,strChar) Then
CleanedString = CleanedString & strChar & theCharSeparator
Else
If (theReplacement <> "") Then
CleanedString = CleanedString & theReplacement & theCharSeparator
End If
End If
Next
'msgbox cleanedstring
CleanTheString = CleanedString
End Function
calltype = WScript.Arguments(0)
Set voic = WScript.CreateObject("SAPI.SpVoice")
Set voic.voice = voic.GetVoices("", "Language=809").Item(0)
select case calltype
case "call"
sNumber = WScript.Arguments(1)
sName = WScript.Arguments(2)
if (sName = "No Name") then
messagePrefix = "Incoming call from number "
' Strip out characters if the message is a number
message = CleanTheString(sNumber, "", "")
else
messagePrefix = "Incoming "
message = sName
end if
case "message"
message = WScript.Arguments(1)
messagePrefix = "Incoming message "
end select
'voic.Speak(snumber)
'strURL = "http://media3:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(" + messagePrefix + ",testing123,10000))"
'strURL = "http://media3:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(sNumber,%20testing123,10000))"
'strURL = "http://www.google.com" + sNumber
poopnewpoop = Replace(sNumber," ","%20")
poopnewpoop2 = Replace(sName," ","%20")
'voic.Speak(poopnewpoop)
'strURL = "http://media3:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(" +poopnewpoop +",%20testing123,10000))"
'strURL = "http://www.google.com"
'strURL = "http://media3:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification("+poopnewpoop2+","+poopnewpoop+",10000))"
'Set objShell = CreateObject("Wscript.Shell")
'objShell.Run(strURL)
Dim oShell
Set oShell = WScript.CreateObject ("WScript.Shell")
oShell.run "cmd /k C:\Progra~1\YAC\wget.exe --tries=1 --timeout=1 [url]http://login:xbmc@media3:8080[/url]/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification("+poopnewpoop2+","+poopnewpoop+",30000)) & C:\Progra~1\YAC\wget.exe --tries=1 --timeout=1 http://login:xbmc@kitchen:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification("+poopnewpoop2+","+poopnewpoop+",30000)) & C:\Progra~1\YAC\wget.exe --tries=1 --timeout=1 http://login:xbmc@media1:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification("+poopnewpoop2+","+poopnewpoop+",30000)) & C:\Progra~1\YAC\wget.exe --tries=1 --timeout=1 http://login:xbmc@media2:8080/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification("+poopnewpoop2+","+poopnewpoop+",30000)) & del xbmc*.* & exit"
Set oShell = Nothing
Set voic = nothing