Donation to Hal 7 Alfa
Im testing the scrapers used in my version of Hal and releasing those that
work to here.
These require that you have some form of office on your machine but could be coded very easly to work with other apps. Open office ect ect ect.
Tested On Xpsp3 and Win7 with Hal7 Alfa.
Triggers are wotd and forex
Why shouldnt hal read the daily stock market and Forex updates hourly
This should be part of Hal7 Alfa test as to why they are here
Let Hal7 flex his muscles on this. Feel free to chop up and use as needed, 02 very powerful plugins.
A day without scraping is just another day
best wishes
cyberjedi
****************************
Rem Type=Plugin
Rem Name= forexlive
Rem Author= 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 Amex
If InStr(1,InputString, "forex",1) > 0 Then
UltraHal = Getforex(HalCommands)
ElseIf InStr(1,InputString, "forex",1) > 0 Then
End If
' This bad boy is a Forex Scraper with a twist, All the data Scraped is ported through Hals Voice.
' This also Breaks Hals speech limitations on how much he can say.
' Trigger= forex
' I give myself about a 7.5 on cool ideas here
Rem PLUGIN: FUNCTIONS
Function Getforex(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")
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 xmlDoc = CreateObject("Microsoft.XMLDOM") 'This is where we grab xml. Switch to open office will be here
Set WshShell = CreateObject("Wscript.Shell")
Set FSO = CreateObject("Scripting.FileSystemObject")
HalMenu.HalCommand "<SPEAK>" & "Reading headlines !" & "</SPEAK>"
For loopvar = 0 to 2
If tempconfirm = loopvar then
if tempconfirm = 1 then
HalMenu.HalCommand "<SPEAK>" & "Currently reading " & confirm & " latest headlines" & "</SPEAK>"
else if tempconfirm = 1 then
HalMenu.HalCommand "<SPEAK>" & "Okay ." & "</SPEAK>"
wscript.quit
else
HalMenu.HalCommand "<SPEAK>" & "Currently reading " & confirm & " latest headlines " & "</SPEAK>"
end if
end if
xmlDoc.async = false
xmlDoc.load("
http://www.forexlive.com/feed/technicalanalysis") ' This is where u put you own rss feed .xml
Set nodelist = xmlDoc.selectNodes("rss/channel/item") '<< This is the current nodes list
i = 3 'ull notice here im set at 3 and only using 2 nodes below. Set as to what u need per your page.
For Each item In nodelist
Set f1 = item.selectsinglenode("title") 'This is where we gather info from the tiltle section of the rss feed.
Set f2 = item.selectsinglenode("description") 'This is where we gather info from the decription section of the rss feed
HalMenu.HalCommand "<SPEAK>" & f1.text & "</SPEAK>" ' these two lines are the Magic of the plugin
HalMenu.HalCommand "<SPEAK>" & f2.text & "</SPEAK>" ' these two lines are the Magic of the plugin
i = i + 1
if i = tempconfirm then
wscript.Quit
end if
Next
end if
Next
End Function