Rem Type=Plugin
Rem Name=word of the day
Rem Author=cyberjedi
Rem Host=Assistant
'What an interesting way to get Hal to learn.
' key word = WOTD (check WOTD)
'Hal reads and parses The word of the day from
http://dictionary.reference.com/wordoftheday/'Hal ports the word of the day through Haptek's engine
'This was a real joy
' On my weirdshizitometer this ranks a solid 9.5
'Copy and paste this code to a .UHP =Done
'Or just dl the UHP
Rem PLUGIN: PRE-PROCESS
'The preceding comment is actually a plug-in directive for
'the Ultra Hal host application. It allows for code snippets
'to be inserted here on-the-fly based on user configuration.
HalBrain.ReadOnlyMode = True
'Determines that you are talking about the wordoftheday
If InStr(1,InputString, "wotd",1) > 0 Then
UltraHal = Getwotd(HalCommands)
ElseIf InStr(1,InputString, "wotd",1) > 0 Then
End If
Rem PLUGIN: FUNCTIONS
Function Getwotd(HalCommands)
Dim oDoc1 , con1
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Sapi = CreateObject("SAPI.SpVoice")
For Each Voice In Sapi.GetVoices
i = i + 1
Next
For loopvar = 0 to i-1
if loopvar = CInt(confirm_voice) then
Set Sapi.Voice = Sapi.GetVoices.Item(loopvar)
end if
Next
Set oDoc1 = CreateObject("HTMLFile")
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
HalMenu.HalCommand "<SPEAK>" & "Please wait ." & "</SPEAK>"
Set con1 = CreateObject("MSXML2.ServerXMLHTTP.6.0")
URL = "
http://dictionary.reference.com/wordoftheday/"
con1.Open "GET", URL , False
con1.Send
oDoc1.Write con1.responseText
HalMenu.HalCommand "<SPEAK>" & "Word of the day is , " & oDoc1.GetElementsByTagName("strong")(0).InnerText & " , which means , " & oDoc1.GetElementsByTagName("ol")(0).InnerText & "</SPEAK>"
End Function