Zabaware Support Forums
Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: cyberjedi on June 07, 2017, 02:46:14 pm
-
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
-
Where is the link for the plugin? I really want to try this one out!
-
It is actually in front of you. Simply Drag/highlight all of the text and do a COPY.
Open NotePad, click on it and do a PASTE.
Now FILE > SAVE AS and give it a name such as WOTD-SCRAPER.uhp or similar to suit you.
That's it.
Most Plug-ins are ordinary Text files. The magic is in knowing what to do with that text! ;)
Hope this helps!
-
Art Thank you
hahhaha
best wishes cyberjedi lmaoooo
-
not seeing the Forrest for the tree's , we have all been their . "I still am sometimes lol !" THANKS CYBERJEDI FOR THE PLUG IN !