Rem Type=Plugin
Rem Name= angermanagement 101
Rem Author= modded by cyberjedi
Rem Host=All
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 = False
'Determines that you are talking about the angermanagement
'<<<<< Ur basic trigger , change as needed
If InStr(1,InputString, "anger",1) > 0 Then
UltraHal = anger(HalCommands)
ElseIf InStr(1,InputString, "anger",1) > 0 Then
End If
' This has been tested on booth XP and 07 platforms
' This is an Rss scraper
' pretty nifty
' i will break this down as best i can.
Rem PLUGIN: FUNCTIONS
Function anger(HalCommands)
Const SVSFlagsAsync = 1
Const DontShowWindow = 0
Const WaitUntilFinished = 1
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Sapi = CreateObject("SAPI.SpVoice") '<<<<<<<This is where we set the stage for ur computers voice. So invest in a good 1
For Each Voice In Sapi.GetVoices
i = i + 1
Next
For loopvar = 0 to i-1
if loopvar = CInt(confirm_voice) then '<<< This is where we stick our hand up Hals skirt and work his mouth like a Puppet.
Set Sapi.Voice = Sapi.GetVoices.Item(loopvar)
end if
Next
Set xmlDoc = CreateObject("Microsoft.XMLDOM") '<<<<< this is where me make documents, we will need 02
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
HalMenu.HalCommand "<SPEAK>" & "Reading headlines !" & "</SPEAK>" '<<<<<this is where we tell Hal to read whats in quotes
For loopvar = 0 to 2
If tempconfirm = loopvar then
if tempconfirm = 1 then
HalMenu.HalCommand "<SPEAK>" & "Currently reading " & confirm & " latest headlines" & "</SPEAK>" '<<<<<< same as above
else if tempconfirm = 1 then
HalMenu.HalCommand "<SPEAK>" & "Okay ." & "</SPEAK>" '<<<<<< same as above
wscript.quit
else
HalMenu.HalCommand "<SPEAK>" & "Currently reading " & confirm & " latest headlines " & "</SPEAK>" '<<<<<< same as above
end if
end if
xmlDoc.async = false
xmlDoc.load("
https://www.sciencedaily.com/rss/mind_brain/anger_management.xml") '<<<<<This is where u put ur feed
Set nodelist = xmlDoc.selectNodes("rss/channel/item") ' <<<This is where u define the site u access.
i = 3 ' <<<You will notice im only using 02 variables F1, F2
For Each item In nodelist ' <<< i choose a different site. U dont have to do this.
Set f1 = item.selectsinglenode("title") '<<<<<<< This is doc 01 ' <<< just me being me. i made this to be a Template.
Set f2 = item.selectsinglenode("description") '<<<< This is doc 02
HalMenu.HalCommand "<SPEAK>" & f1.text & "</SPEAK>" ' This is where the magic happens (remember the 02 documents) ^^^^^^
HalMenu.HalCommand "<SPEAK>" & f2.text & "</SPEAK>" ' This is where the magic happens (remember the 02 documents) ^^^^^^
i = i + 1 ' Hal litterally reads the 02 documents , but with out Hals speech limitations
if i = tempconfirm then ' Whos ur daddy now,lololol 1000's of plugins could be made off this.
wscript.Quit
end if
Next
end if
Next
End Function '<<<<<<<<<This is where we get the finger and it closes out.