Zabaware Support Forums
Zabaware Forums => General Discussion => Topic started by: lightspeed on December 26, 2013, 11:54:08 am
-
this is an idea , i know their has been a horoscope plug in , it's been a long time since i used it .
It would be nice if their was a plug in where a person could say "what's my horoscope for today " and the plug in would access varied sites ( user could have a choice to pick from in the plug in setting , same with choosing birthday to get the right zodiac sign ) and hal would say here's your horoscope for today and read the current day horoscope for September 10th , etc. .
I will have to dig up that horoscope to take another look at it , i don't remember if it did the same or not , maybe someone on here knows ?
-
I am checking the internet trying to find a freeware web bot for predicting the future simlur to the other web bot that used data mining off the web for future predictions .
http://en.wikipedia.org/wiki/Web_Bot
thought it would be cool if hal could access a program like this for users !
http://webbot.org.uk/iPoint/ipoint
-
Okay i found a horoscope plug in and tried it but got an error i am pretty sure it worked okay before , but may not in the upgraded version hal brain ? since then . it was created by cutting edge2005 .
here is the lay out of it . and below that the error i got .
Rem PLUGIN: PLUGINAREA7
CheckStarSign = CheckHoroscope(OriginalSentence)
If Len(CheckStarSign) > 2 Then
Dim objXMLHoroscope
Dim HoroscopeArray()
set objXMLHoroscope = CreateObject("Msxml2.DomDocument.4.0")
objXMLHoroscope.async = False
objXMLHoroscope.ValidateOnParse = false
objXMLHoroscope.load("http://www.ganeshaspeaks.com/horoscopes/daily" & CheckStarSign & "horoscope.xml")
Dim xmlNodeHoroscope
set xmlNodeHoroscope = objXMLHoroscope.documentElement.selectNodes("channel")
Dim xmlHoroscopeItem
Dim strResult
For Each xmlHoroscopeItem In xmlNodeHoroscope
CountHoroscope = CountHoroscope+1
Next
ReDim HoroscopeArray(CountHoroscope-1)
For Each xmlHoroscopeItem In xmlNodeHoroscope
Set Horoscope = xmlHoroscopeItem.selectSingleNode("item/description")
GetHoroscope = Horoscope.Text
If FindHoroscope = "" Then FindHoroscope = HalBrain.SearchPattern(GetHoroscope, "*<i>*</i>*", 2)
FindHoroscope = Replace(FindHoroscope, "ganesha", ComputerName, 1, -1, vbTextCompare)
Next
GetResponse = CheckStarSign & " horoscope for " & Now & ", " & FindHoroscope
HalBrain.ReadOnlyMode = True
End If
Rem PLUGIN: FUNCTIONS
Function CheckHoroscope(OriginalSentence)
StarSign = ""
If InStr(1,OriginalSentence, "Aries",1) Then StarSign = "aries"
If InStr(1,OriginalSentence, "Taurus",1) Then StarSign = "taurus"
If InStr(1,OriginalSentence, "Gemini",1) Then StarSign = "gemini"
If InStr(1,OriginalSentence, "Cancer",1) Then StarSign = "cancer"
If InStr(1,OriginalSentence, "Leo",1) Then StarSign = "leo"
If InStr(1,OriginalSentence, "Virgo",1) Then StarSign = "virgo"
If InStr(1,OriginalSentence, "Libra",1) Then StarSign = "libra"
If InStr(1,OriginalSentence, "Scorpio",1) Then StarSign = "scorpio"
If InStr(1,OriginalSentence, "Sagittarius",1) Then StarSign = "sagittarius"
If InStr(1,OriginalSentence, "Capricorn",1) Then StarSign = "capricorn"
If InStr(1,OriginalSentence, "Aquarius",1) Then StarSign = "aquarius"
If InStr(1,OriginalSentence, "Pisces",1) Then StarSign = "pisces"
If Len(StarSign) > 1 Then
If Inform = "" Then Inform = False
If InStr(1,OriginalSentence, "I am an",1) Then Inform = True
If InStr(1,OriginalSentence, "I'm an",1) Then Inform = True
If InStr(1,OriginalSentence, "Horoscope for",1) Then Inform = True
If InStr(1,OriginalSentence, "I am a ",1) Then Inform = True
If InStr(1,OriginalSentence, "I'm a ",1) Then Inform = True
If InStr(1,OriginalSentence, "what is " & StarSign & "' horoscope",1) Then Inform = True
If InStr(1,OriginalSentence, "what is " & StarSign & "'s horoscope",1) Then Inform = True
If InStr(1,OriginalSentence, "horoscope on",1) Then Inform = True
If Inform = True Then
CheckHoroscope = StarSign
End If
End If
End Function