dupa

Author Topic: Hal plugs into Forexlive: Feed Updated Hourly.  (Read 2037 times)

cyberjedi

  • Hero Member
  • *****
  • Posts: 810
  • The Mighty Hal Machine
    • View Profile
Hal plugs into Forexlive: Feed Updated Hourly.
« on: June 12, 2017, 10:55:46 am »
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 = True
'Determines that you are talking about the Forex
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.  It took cyberjedi to pull it off. Enjoy. 
    ' This also Breaks Hals speech limitations on how much he can say. 
 ' Trigger= forex
     'I put this together while listening to this. -->>>https://www.youtube.com/watch?v=YS8YP7mtNss&t=2s
  'Follow me in to the jungle. http://vaughnlive.tv/mrelectric
 ' I give myself about a 7.5 on cool ideas here
 'Once again make sure that ur SAPI05 engine is on and working
 'This means the lips must MOVE...lol
 'Forex updates this feed hourly
' Wana take the time to thank LifeTimeGamer  who took a leap of faith and works with me
' tirelessly and beta test all the code. And watches my dumb movies.
' Shout out to onthecuttingedge2005 Trigger refinement

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")
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")
i = 3
For Each item In nodelist
Set f1 = item.selectsinglenode("title")
Set f2 = item.selectsinglenode("description")
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
« Last Edit: June 18, 2017, 01:35:44 pm by cyberjedi »