dupa

Author Topic: can't get cyberjedi's local rss weather feed to work with my link  (Read 1809 times)

lightspeed

  • Hero Member
  • *****
  • Posts: 6761
    • View Profile
can't get cyberjedi's local rss weather feed to work with my link , what am i doing wrong?? here is the web page link for weather area  http://www.rssweather.com/wx/us/mo/linn%20county/wx.php  i placed this where cyberjedi said to replace his weather link with . but can't get it to work right .
it says use user name after weather (if i am right i used name my hal calls me) . Any help on this would be appreciated !! :)


below is the local weather with my link inserted .


Rem Type=Plugin
Rem Name= localnews
Rem Author= cyberjedi
Rem Host=All

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------

Sub OptionsPanel()
lblPlugin(0).Caption = ""
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7


HalBrain.ReadOnlyMode = False
'Determines that you are talking about the weather
GetW = HalBrain.TopicSearch(UserName, "UserWeather")
If InStr(1,OriginalSentence, "weather",1) And Len(GetW) > 2 Then
 GetResponse = GetForecast(UserName)
ElseIf InStr(1,OriginalSentence, "weather",1) And Len(GetW) < 2 Then
End If


 ' This bad boy is a 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= weather. This is for my news and weather, but has many uses. Just point it where you want. Change key word.
  'Working example https://www.youtube.com/watch?v=ugnohzxD4Hg   
   'I put this together while listening to this. -->>>https://www.youtube.com/watch?v=aqXW57WM9TA
  'Follow me in to the jungle. http://vaughnlive.tv/mrelectric
 ' I give myself about a 6.5 on cool ideas here


Rem PLUGIN: FUNCTIONS
Function GetForecast(UserName)

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.rssweather.com/wx/us/mo/linn%20county/wx.php") ' 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: July 04, 2017, 07:49:51 pm by lightspeed »