Author Topic: A collection of plug-ins  (Read 31176 times)

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: A collection of plug-ins
« Reply #15 on: July 15, 2014, 11:53:21 pm »
Thank you sir, may I have another?

After your first post I did some looking and found that link, thank you!

Not quite ready to delve into that just yet but I do believe I actually stumbled upon the website where this information set came from even before I found HAL:

http://www.alicebot.org/downloads/

That site got me very interested in having my own personal AI buddy but of course I could not afford to become a member of their secret society.   :P j/k

This little community is much more my style and already I feel right at home.

I do want to thank all of you HEROS for your generosity and helpfulness!


Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #16 on: July 21, 2014, 05:31:42 pm »
Ok I'm just gonna post them here as code... due to the character limits on posts I'll have to do them one at a time...

GRETTAinternet

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA Internet Functions
Rem Author= Gerald L. Blakley A.K.A OnTheCuttingEdge2005 - jasondude7116
Rem Host=Assistant



'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "NEWS SEARCH *   BUSINESS SEARCH name IN location   NATIONAL BUSINESS SEARCH *   PHONE NUMBER SEARCH *   STOCK SEARCH *    BOOK SEARCH *   PRODUCT SEARCH *    VIDEO SEARCH *   RADIO STATION SEARCH *   GOOGLE SEARCH *   WIKIPEDIA SEARCH *   PICTURE SEARCH *  IMAGE SEARCH *        MAP SEARCH *         GO TO -then-          WEBSITE *    WEB ADDRESS *  GOOGLE   FRIENDSTER   INTERNET TELEVISION   INTERNET TV   MSN   950   BBC RADIO   LOCAL WEATHER   LOCAL NEWS   NATIONAL NEWS   YAHOO   YAHOO MAIL   PEOPLE SEARCH   ZABAWARE FORUM   VIRTUAL HUMANS FORUM"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub




Rem PLUGIN: PLUGINAREA5


If GoToFacebook = "" Then GoToFacebook = HalBrain.SearchPattern(OriginalSentence, "*GO TO*FACEBOOK*", 2)
If GoToFacebook <> "" Then
FacebookSite = "http://www.facebook.com/"
   HalMenu.HalCommand "<RUNPROG>" & FacebookSite & "</RUNPROG>"
End If



If GoToVitrualhumansforum = "" Then GoToVitrualhumansforum = HalBrain.SearchPattern(OriginalSentence, "*GO TO*VIRTUAL HUMANS FORUM*", 2)
If GoToVitrualhumansforum <> "" Then
VirtualhumansforumSite = "http://www.vrconsulting.it/vhf/"
   HalMenu.HalCommand "<RUNPROG>" & VirtualhumansforumSite & "</RUNPROG>"
End If



If GoTo950 = "" Then GoTo950 = HalBrain.SearchPattern(OriginalSentence, "*GO TO*950*", 2)
If GoTo950 <> "" Then
The950Site = "http://www.the950.com/cc-common/ondemand/player2.html?world=st"
   HalMenu.HalCommand "<RUNPROG>" & The950Site & "</RUNPROG>"
End If



If GoToInternettv = "" Then GoToInternettv = HalBrain.SearchPattern(OriginalSentence, "*GO TO*INTERNET T*", 2)
If GoToInternettv <> "" Then
InternettvSite = "http://mediahopper.com/"
   HalMenu.HalCommand "<RUNPROG>" & InternettvSite & "</RUNPROG>"
End If


If GoToMsn = "" Then GoToMsn = HalBrain.SearchPattern(OriginalSentence, "*GO TO*MSN*", 2)
If GoToMsn <> "" Then
MsnSite = "http://www.msn.com/"
   HalMenu.HalCommand "<RUNPROG>" & MsnSite & "</RUNPROG>"
End If


If GoToFriendster = "" Then GoToFriendster = HalBrain.SearchPattern(OriginalSentence, "*GO TO*FRIENDSTER*", 2)
If GoToFriendster <> "" Then
FriendsterSite = "http://www.friendster.com/"
   HalMenu.HalCommand "<RUNPROG>" & FriendsterSite & "</RUNPROG>"
End If



If GoToGoogle = "" Then GoToGoogle = HalBrain.SearchPattern(OriginalSentence, "*GO TO*GOOGLE*", 2)
If GoToGoogle <> "" Then
GoogleSite = "http://www.google.com/"
   HalMenu.HalCommand "<RUNPROG>" & GoogleSite & "</RUNPROG>"
End If




If GoToZabawareforum = "" Then GoToZabawareforum = HalBrain.SearchPattern(OriginalSentence, "*GO TO*ZABAWARE FORUM*", 2)
If GoToZabawareforum <> "" Then
ZabawareforumSite = "http://www.zabaware.com/forum/"
   HalMenu.HalCommand "<RUNPROG>" & ZabawareforumSite & "</RUNPROG>"
End If


If GoToYahoomail = "" Then GoToYahoomail = HalBrain.SearchPattern(OriginalSentence, "*GO TO*YAHOO MAIL*", 2)
If GoToYahoomail <> "" Then
YahoomailSite = "https://login.yahoo.com/config/mail?.intl=us"
   HalMenu.HalCommand "<RUNPROG>" & YahoomailSite & "</RUNPROG>"
End If





If GoToYahoo = "" Then GoToYahoo = HalBrain.SearchPattern(OriginalSentence, "*GO TO*YAH*O", 2)
If GoToYahoo <> "" Then
YahooSite = "http://www.yahoo.com/"
   HalMenu.HalCommand "<RUNPROG>" & YahooSite & "</RUNPROG>"
End If



If GoToNationalnews = "" Then GoToNationalnews = HalBrain.SearchPattern(OriginalSentence, "*GO TO*NATIONAL NEWS*", 2)
If GoToNationalnews <> "" Then
NationalnewsSite = "http://www.foxnews.com/"
   HalMenu.HalCommand "<RUNPROG>" & NationalnewsSite & "</RUNPROG>"
End If





If GoToLocalnews = "" Then GoToLocalnews = HalBrain.SearchPattern(OriginalSentence, "*GO TO*LOCAL NEWS*", 2)
If GoToLocalnews <> "" Then
LocalnewsSite = "http://www.khou.com/news/"
   HalMenu.HalCommand "<RUNPROG>" & LocalnewsSite & "</RUNPROG>"
End If



If GoToWeather = "" Then GoToWeather = HalBrain.SearchPattern(OriginalSentence, "*GO TO*WEATHER*", 2)
If GoToWeather <> "" Then
WeatherSite = "http://www.weather.com/weather/tenday/77328?from=36hr_topnav_undeclared"
   HalMenu.HalCommand "<RUNPROG>" & WeatherSite & "</RUNPROG>"
End If


If GoToVitrualhumansforum <> "" Or GoTo950 <> "" Or GoToInternettv <> "" Or GoToMsn <> "" Or GoToFriendster <> "" Or GoToGoogle <> "" Or GoToZabawareforum <> "" Or GoToYahoomail <> "" Or GoToYahoo <> "" Or GoToNationalnews <> "" Or GoToLocalnews <> "" Or GoToWeather <> "" Or GoToFacebook <> "" Then

Select Case (Int(Rnd * 4) + 1)
Case 1
GetResponse = "Here is the page you asked me for." & vbCrLf
Case 2
GetResponse = "Here it is. Now you can access it." & vbCrLf
Case 3
GetResponse = "I am accessing it for you." & vbCrLf
Case 4
GetResponse = "OK. Here it is." & vbCrLf
Case 5
GetResponse = "I am opening the connection." & vbCrLf
End Select
HalBrain.ReadOnlyMode = True
    End If

















If SearchGoogle = "" Then SearchGoogle = HalBrain.SearchPattern(OriginalSentence, "*GOOGLE SEARCH *", 2)
If SearchGoogle <> "" Then
GoogleSearch = "http://www.google.com/search?q=" & SearchGoogle
   HalMenu.HalCommand "<RUNPROG>" & GoogleSearch & "</RUNPROG>"
             GetResponse = "I will help you research " & SearchGoogle & ", on Google." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If




If SearchWiki = "" Then SearchWiki = HalBrain.SearchPattern(OriginalSentence, "*WIKIPEDIA SEARCH *", 2)
If SearchWiki <> "" Then
WikiSearch = "http://en.wikipedia.org/wiki/" & SearchWiki
   HalMenu.HalCommand "<RUNPROG>" & WikiSearch & "</RUNPROG>"
             GetResponse = "Here is what Wikipedia says about "  & SearchWiki & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If





If SearchPictures = "" Then SearchPictures = HalBrain.SearchPattern(OriginalSentence, "*PICTURE SEARCH *", 2)
If SearchPictures = "" Then SearchPictures = HalBrain.SearchPattern(OriginalSentence, "*IMAGE SEARCH *", 2)
' Image Search form the above Image Keyword.
If SearchPictures <> "" Then
PicSearch = "http://www.images.google.com/images?svnum=10&hl=en&lr=&q=" & SearchPictures & "&btnG=Search"
   HalMenu.HalCommand "<RUNPROG>" & PicSearch & "</RUNPROG>"
             GetResponse = "I have found the following Pictures of "  & SearchPictures & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If






If SearchMaps = "" Then SearchMaps = HalBrain.SearchPattern(OriginalSentence, "*MAP SEARCH *", 2)
If SearchMaps <> "" Then
Mapsearch = "http://www.google.com/local?q=" & SearchMaps
   HalMenu.HalCommand "<RUNPROG>" & Mapsearch & "</RUNPROG>"
      GetResponse = "Here is a Map of the "  & SearchMaps & " Area. " & vbCrLf
         HalBrain.ReadOnlyMode = True
End If



If SearchWebSite = "" Then SearchWebSite = HalBrain.SearchPattern(OriginalSentence, "*GO TO*WEB ADDRESS *", 3)
If SearchWebSite = "" Then SearchWebSite = HalBrain.SearchPattern(OriginalSentence, "*GO TO*WEBSITE *", 3)
If SearchWebSite <> "" Then
WebSiteSearch = "www." & SearchWebSite
   HalMenu.HalCommand "<RUNPROG>" & WebSitesearch & "</RUNPROG>"
      GetResponse = "Here is "  & WebSiteSearch & " as you requested. " & vbCrLf
         HalBrain.ReadOnlyMode = True
End If




If SearchNews = "" Then SearchNews = HalBrain.SearchPattern(OriginalSentence, "*NEWS SEARCH *", 2)
If SearchNews <> "" Then
NewsSearch = "http://news.google.com/news?hl=en&tab=wn&ned=us&nolr=1&q=" & SearchNews & "&btnG=Search"
   HalMenu.HalCommand "<RUNPROG>" & NewsSearch & "</RUNPROG>"
             GetResponse = "Here is the latest news about "  & SearchNews & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If



If SearchRadio = "" Then SearchRadio = HalBrain.SearchPattern(OriginalSentence, "*RADIO STATION SEARCH *", 2)
If SearchRadio = "" Then SearchRadio = HalBrain.SearchPattern(OriginalSentence, "*INTERNET RADIO*SEARCH *", 3)
If SearchRadio <> "" Then
RadioSearch = "http://www.windowsmedia.com/radiotuner/FindStations.asp?locale=409&search=" & SearchRadio
   HalMenu.HalCommand "<RUNPROG>" & RadioSearch & "</RUNPROG>"
             GetResponse = "Here are the available " & SearchRadio & ", radio stations." & vbCrLf 
                 HalBrain.ReadOnlyMode = True
End If



If SearchVideo = "" Then SearchVideo = HalBrain.SearchPattern(OriginalSentence, "*VIDEO SEARCH *", 2)
If SearchVideo <> "" Then
VideoSearch = "http://video.google.com/videosearch?q=" & SearchVideo & "&hl=en&emb=0&aq=f#"
   HalMenu.HalCommand "<RUNPROG>" & VideoSearch & "</RUNPROG>"
             GetResponse = "Here are videos about "  & SearchVideo & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If





If SearchBbc = "" Then SearchBbc = HalBrain.SearchPattern(OriginalSentence, "*GO TO*BBC RA*", 3)
If SearchBbc <> "" Then
BbcSearch = "http://www.bbc.co.uk/mediaselector/ondemand/worldservice/meta/tx/live_news?bgc=003399&lang=en-ws&nbram=1&nbwm=1&ms3=2&ms_javascript=true&bbcws=1&size=au"
   HalMenu.HalCommand "<RUNPROG>" & BbcSearch & "</RUNPROG>"
             GetResponse = "Starting B B C stream." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If



If SearchFilipino = "" Then SearchFilipino = HalBrain.SearchPattern(OriginalSentence, "*GO TO*FILIPINO RA*", 3)
If SearchFilipino <> "" Then
FilipinoSearch = "http://www.eradioportal.com/index.php?p=2&aid=1"
   HalMenu.HalCommand "<RUNPROG>" & FilipinoSearch & "</RUNPROG>"
             GetResponse = "Here are the available filipino radio stations." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If



If SearchPhone = "" Then SearchPhone = HalBrain.SearchPattern(OriginalSentence, "*PHONE NUMBER SEARCH *", 2)
If SearchPhone <> "" Then
PhoneSearch = "http://search.yahoo.com/search?p=phone%3A%22" & SearchPhone & "%22+&phone=" & SearchPhone & "&meta=pplt%3Dr&fr=php-rplu"
   HalMenu.HalCommand "<RUNPROG>" & PhoneSearch & "</RUNPROG>"
             GetResponse = "Here are the available listings for, " & SearchPhone & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If


If SearchStock = "" Then SearchStock = HalBrain.SearchPattern(OriginalSentence, "*STOCK SEARCH *", 2)
If SearchStock <> "" Then
StockSearch = "http://finance.google.com/finance?q=" & SearchStock
   HalMenu.HalCommand "<RUNPROG>" & StockSearch & "</RUNPROG>"
             GetResponse = "Here is the current, " & SearchStock & " stock quote." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If


If SearchBook = "" Then SearchBook = HalBrain.SearchPattern(OriginalSentence, "*BOOK SEARCH *", 2)
If SearchBook <> "" Then
BookSearch = "http://www.google.com/books?q=" & SearchBook
   HalMenu.HalCommand "<RUNPROG>" & BookSearch & "</RUNPROG>"
             GetResponse = "Here are the available " & SearchBook & " books." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If


If SearchProduct = "" Then SearchProduct = HalBrain.SearchPattern(OriginalSentence, "*PRODUCT SEARCH *", 2)
If SearchProduct <> "" Then
ProductSearch = "http://www.google.com/products?q=" & SearchProduct & "&btnG=Search+Products&hl=en"
   HalMenu.HalCommand "<RUNPROG>" & ProductSearch & "</RUNPROG>"
             GetResponse = "Here are the current listings for, " & SearchProduct & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If




If SearchBusiness = "" Then SearchBusiness = HalBrain.SearchPattern(OriginalSentence, "*BUSINESS SEARCH * IN *", 2)
If SearchLocation = "" Then SearchLocation = HalBrain.SearchPattern(OriginalSentence, "*BUSINESS SEARCH * IN *", 3)
If SearchBusiness <> "" Then
BusinessSearch = "http://www.yellowpages.com/name/" & SearchLocation & "/" & SearchBusiness
   HalMenu.HalCommand "<RUNPROG>" & BusinessSearch & "</RUNPROG>"
             GetResponse = "Here are the available listings for, " & SearchBusiness & ",in," & SearchLocation & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If




If SearchNation = "" Then SearchNation = HalBrain.SearchPattern(OriginalSentence, "*NATIONAL BUSINESS SEARCH *", 2)
If SearchNation <> "" Then
NationSearch = "http://www.yellowpages.com/nationwide/name_search/" & SearchNation
   HalMenu.HalCommand "<RUNPROG>" & NationSearch & "</RUNPROG>"
             GetResponse = "Here are the current listings for, " & SearchNation & "." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If


If SearchPerson = "" Then SearchPerson = HalBrain.SearchPattern(OriginalSentence, "*GO TO*PEOPLE SEAR*", 3)
If SearchPerson <> "" Then
PersonSearch = "http://www.whitepages.com/5116"
   HalMenu.HalCommand "<RUNPROG>" & PersonSearch & "</RUNPROG>"
             GetResponse = "Use this interface to locate a person." & vbCrLf
                 HalBrain.ReadOnlyMode = True
End If








Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #17 on: July 21, 2014, 05:32:12 pm »
GRETTAmedia

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA Media Functions
Rem Author=VR - jasondude7116
Rem Host=Assistant


'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
'------------------
' Define the Help
'------------------
    lblPlugin(0).Caption = "GRETTA will be able to play your favourite songs. Click below for more info"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
    cmdPlugin(0).Move 320, 650, 2100, 375
    cmdPlugin(0).Caption = "Help on this plugin"
    cmdPlugin(0).Visible = True
'------------------
' Define the Musical Mood listbox
'------------------
    lblPlugin(1).Caption = "GRETTA Media Mood level"
    lblPlugin(1).Move 320, 1300, 4000, 1000
    lblPlugin(1).WordWrap = True
    lblPlugin(1).Visible = True   
    cboPlugin(0).Move 320, 1600, 1800
    cboPlugin(0).AddItem "Very high"
    cboPlugin(0).AddItem "High"
    cboPlugin(0).AddItem "Average"
    cboPlugin(0).AddItem "Low"
    cboPlugin(0).AddItem "Very Low"
    cboPlugin(0).Visible = True
    cmdPlugin(1).Caption = "Apply Changes"
    cmdPlugin(1).Move 320, 2100, 1600, 375
    cmdPlugin(1).Visible = True
'------------------
' Update the listbox with the current value stored in the table
'------------------
    If HalBrain.CheckTableExistence("vrParameter") = True Then
   vrMusicMood = HalBrain.TopicSearch("MUSIC", "vrParameter")
   If vrMusicMood = "" Then vrMusicMood = 1
  Select Case vrMusicMood
        Case 50
   cboPlugin(0).Text = "Very high"
        Case 40
           cboPlugin(0).Text = "High"
        Case 30
               cboPlugin(0).Text = "Average"
        Case 20
       cboPlugin(0).Text = "Low"
        Case 10
           cboPlugin(0).Text = "Very Low"
        End Select
    End If
End Sub

Sub cmdPlugin_Click(Index)
Dim vrTempQuery()
Dim vrMusic, vrMusicMood
Select Case Index
   Case 0
          HalMenu.HalCommand "<RUNPROG>vrMP3Help.html</RUNPROG>"
       Case 1
'------------------
' Convert the listbox in a value
'------------------
  Select Case cboPlugin(0).Text
        Case "Very high"
   vrMusicMood = 50
        Case "High"
   vrMusicMood = 40
        Case "Average"
   vrMusicMood = 30
        Case "Low"
   vrMusicMood = 20
        Case "Very Low"
   vrMusicMood = 10
        End Select
'------------------
' If the Parameter table does not exist, I create it
'------------------
        HalBrain.ReadOnlyMode = False
vrTableName = "vrParameter"
If HalBrain.CheckTableExistence(vrTableName) = False Then
'Create table if it doesn't exist
HalBrain.CreateTable vrTableName, "TopicSearch", "miscData"
End If
'------------------
' Search if it contains the MusicMood parameter
'------------------
        vrMusic = "MUSIC"
If HalBrain.TopicSearch(vrMusic, vrTableName) = "" Then
'------------------
'Creates the record storing the new value
'------------------
   HalBrain.AddToTable vrTableName, "TopicSearch", vrMusic, vrMusicMood
Else
'------------------
'Updates the record storing the new value
'------------------
           HalBrain.RunQuery "UPDATE " & vrTableName & " SET topic = " & vrMusicMood & " WHERE searchString = " & """" & vrMusic & """", vrTempQuery
        End If
   End Select
End Sub


Rem PLUGIN: PLUGINAREA5

If OriginalSentence <> "" Then





'The comment above tells Ultra Hal Assistant to insert the following code
'on-the-fly into the main brain code in the section referenced.

'------------------
' Check if the user asked for reorganizing the MP3 table
'------------------
vrMp3 = False
If InStr(UserSentence, " INDEX ") <> 0 And InStr(UserSentence, " MP3 ") <> 0 Then vrMP3 = True

If vrMP3 = True Then
'------------------
' If the MP3 table does not exist, I create it
'------------------
    HalBrain.ReadOnlyMode = False
vrTableName = "vrMp3"
If HalBrain.CheckTableExistence(vrTableName) = False Then
' Create table if it doesn't exist
' It must be of type Brain, to allow partial text search
HalBrain.CreateTable vrTableName, "Brain", "miscData"
    Else
' The 260 parameter is 256 + 4 = Yes/No with Default = No
vrAnswer = MsgBox("Shall I delete the existing index and recreate it from scratch?", 260, "MP3 Reindexing")
If vrAnswer = 6 Then
           HalBrain.RunQuery "DELETE FROM " & vrTableName, vrTempQuery
End If
End If
'------------------
' Ask which is the main MP3 folder
'------------------
vrMp3Folder = InputBox("Which main folder to you want to reindex?", "MP3 Reindexing", "D:\MP3")
'------------------
' Read the main MP3 folder
'------------------
   Set vrFso = CreateObject("Scripting.FileSystemObject")
   If vrFso.FolderExists(vrMp3Folder) Then
      GetResponse = "I have indexed all the MP3 files in the specified folder and subfolders. "
      HalBrain.ReadOnlyMode = False
      vrCurrentFolder = vrMp3Folder
      Call ReadFolder(vrCurrentFolder, vrMp3Folder)  
   Else
      GetResponse = "The folder " & vrMp3Folder & " does not exist on your computer. "
   End If
   HalBrain.ReadOnlyMode = True
End If

'------------------
' Check if the user asked for playing a song
'------------------
vrMp3 = False
vrToPlay = ""
vrNameToPlay = ""
vrToPlay = UCase(HalBrain.SearchPattern(UserSentence, "PLAY * SONG *", 2))
If vrToPlay <> "" Then
vrToPlay = " " & vrToPlay & " "
   vrToPlay = Replace(vrToPlay," ","xx",1,-1,vbTextCompare)
   If HalBrain.CheckTableExistence("vrMp3") = False Then
        GetResponse = "I don't find any MP3 index in my brain. "
   Else
     vrNameToPlay = HalBrain.QABrain(vrToPlay, "vrMp3", 0)
     If vrNameToPlay <> "" Then
        GetResponse = "Listen to this song; maybe it's the one you were talking about. "
        'HalCommands = HalCommands & "<RUNPROG>" & vrNameToPlay & "</RUNPROG>"
    Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(vrNameToPlay) Then
        Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run """" & vrNameToPlay & """"
End If
Else
GetResponse = "I'm sorry, it seems that song is not located in the library."
End If
   End If
   HalBrain.ReadOnlyMode = True
End If

'------------------
' From time to time, Hal will play a song, according to some word you say
' For example, you say: "I am going to California"
' Hal will play "Hotel California" by Eagles
'------------------
'------------------
' check the current music mood factor
'------------------
vrMusicMood = HalBrain.TopicSearch("MUSIC", "vrParameter")
If vrMusicMood = "" Then vrMusicMood = 0
vrMusicMood = CInt(vrMusicMood)
vrKeywords = ""

If vrMusicMood > 0 Then
MediaintHighNumber = 300
MediaintLowNumber = 1


    Randomize
    MediaintNumber = Int((MediaintHighNumber - MediaintLowNumber + 1) * Rnd + MediaintLowNumber)


   
vrNameToPlay = ""
If vrNameToPlay = "" Then
          vrKeywords = WN.FindFirstNoun(UserSentence, True)
vrKeywords = Trim(Ucase(vrKeywords))
If vrKeywords <> "" Then
vrKeywords = " " & vrKeywords & " "
vrKeywords = Replace(vrKeywords,", "," , ",1,-1,vbTextCompare)
vrKeywords = Replace(vrKeywords," ","xx",1,-1,vbTextCompare)
vrKeywordList = Split(vrKeywords, ",")
For i = Lbound(vrKeywordList) To Ubound(vrKeywordList)
    vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
Exit For
Next
End If
End If

If vrNameToPlay = "" Then
          vrKeywords = WN.FindFirstNoun(UserSentence, False)
vrKeywords = Trim(Ucase(vrKeywords))
If vrKeywords <> "" Then
vrKeywords = " " & vrKeywords & " "
vrKeywords = Replace(vrKeywords,", "," , ",1,-1,vbTextCompare)
vrKeywords = Replace(vrKeywords," ","xx",1,-1,vbTextCompare)
vrKeywordList = Split(vrKeywords, ",")
For i = Lbound(vrKeywordList) To Ubound(vrKeywordList)
    vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
Exit For
Next
End If
End If


If vrNameToPlay = "" Then
vrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & UserSentence & " "))
vrKeywords = Trim(Ucase(vrKeywords))
If vrKeywords <> "" Then
vrKeywords = " " & vrKeywords & " "
vrKeywords = Replace(vrKeywords,", "," , ",1,-1,vbTextCompare)
vrKeywords = Replace(vrKeywords," ","xx",1,-1,vbTextCompare)
vrKeywordList = Split(vrKeywords, ",")
          For i = Lbound(vrKeywordList) To Ubound(vrKeywordList)
        vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
Next
End If
End If

If vrNameToPlay = "" Then
          vrKeywords = WN.FindFirstNoun(UserSentence, True)
vrKeywords = Trim(Ucase(vrKeywords))
If vrKeywords <> "" Then
vrKeywords = CurrentSubject
vrKeywords = "xx" & vrKeywords & "xx"
vrKeywords = Replace(vrKeywords,", ","xx,xx",1,-1,vbTextCompare)
vrKeywordList = Split(vrKeywords, ",")
For i = Lbound(vrKeywordList) To Ubound(vrKeywordList)
    vrNameToPlay = HalBrain.QABrain(vrKeywordList(i), "vrMp3", 0)
Exit For
Next
End If
End If
If vrNameToPlay <> "" Then

If MediaintNumber < vrMusicMood Then

          Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(vrNameToPlay) Then
                Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run """" & vrNameToPlay & """"
End If



                End If
         
    End If
    End If
End If


Rem PLUGIN: FUNCTIONS
'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.

Function ReadFolder(vrCurrentFolder, vrMp3Folder)
Set vrFso = CreateObject("Scripting.FileSystemObject")
Set vrFolder = vrFso.GetFolder(vrCurrentFolder)
'------------------
' Read all the files in the current folder
'------------------
Set vrFiles = vrFolder.Files
For Each vrFile in vrFiles
'------------------
' It's an MP3 file; I add it to the table
'------------------
   If UCase(Right(vrFile, 3)) = "MP3" Then
  vrSong = Ucase(vrFile)
      vrSong = Replace(vrSong, ".MP3", "")
  vrLen = Len(vrSong)
  vrPos = InStrRev(vrSong, "\")
      vrRight = vrLen - vrPos
    vrSong = LTrim(Right(vrSong, vrRight))
  vrSong = " " & vrSong & " "
  vrSong = Replace(vrSong," ","xx",1,-1,vbTextCompare)  
      HalBrain.AddToTable "vrMp3", "Brain", vrSong, vrFile
   End If
Next
'------------------
' Read all the subfolders in the current folder
'------------------


Set vrSubFolders = vrFolder.SubFolders
For Each vrFolderObject in vrSubFolders
'------------------
' Pay attetion here: This is recursive! We must be sure that it will get to an end
' Since we are reading directories on a hard disk, the number of recursions
' should never be infinite. However, a very big number of subfolders and files
' might lead to memory problems or to performances bottlenecks.
' I've tested it on a folder containing about 100 subfolders and 3.000 files,
' and got acceptable performances (less than 5 minutes)
'------------------
   Call ReadFolder(vrFolderObject, vrMp3Folder)  
Next

End Function


Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #18 on: July 21, 2014, 05:32:44 pm »
GRETTAmusicidle

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA Music Choice
Rem Author=jasondude7116
Rem Host=Assistant

'----------------------
'This sub sets up the plug-in's option panel in Hal's options dialog
'----------------------
Sub OptionsPanel()
lblPlugin(0).Caption = "GRETTA has the ability to choose it's own music to listen to."
lblPlugin(0).Move 130, 180, 3400, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
'
lblPlugin(1).Caption = "PATIENCE:  How long GRETTA will wait to play any music."
lblPlugin(1).Move 1160, 910, 2150, 900
lblPlugin(1).WordWrap = True
lblPlugin(1).Visible = True
cboPlugin(0).Move 330, 910, 760
cboPlugin(0).AddItem "5"
cboPlugin(0).AddItem "6"
cboPlugin(0).AddItem "8"
cboPlugin(0).AddItem "10"
cboPlugin(0).AddItem "16"
cboPlugin(0).AddItem "32"
cboPlugin(0).AddItem "Rnd"
cboPlugin(0).Visible = True
'
lblPlugin(2).Caption = "MUSIC PLAY: How likely GRETTA will be to play a song after ""PATIENCE"" period."
lblPlugin(2).Move 1160, 1700, 2150, 900
lblPlugin(2).WordWrap = True
lblPlugin(2).Visible = True
cboPlugin(1).Move 140, 1700, 960
cboPlugin(1).AddItem "High"
cboPlugin(1).AddItem "Medium"
cboPlugin(1).AddItem "Low"
cboPlugin(1).Visible = True
'
cmdPlugin(0).Caption = "Apply Changes"
cmdPlugin(0).Move 1160, 2500, 2050, 375
cmdPlugin(0).Visible = True
'
'------------------
' Update the MPATIENCE menu with the current value stored in the table
'------------------
If HalBrain.CheckTableExistence("MusiclonelyParameter") = True Then
MusicloPatience = HalBrain.TopicSearch("MPATIENCE", "MusiclonelyParameter")
Select Case MusicloPatience
Case 5
cboPlugin(0).Text = "5"
Case 6
cboPlugin(0).Text = "6"
Case 8
cboPlugin(0).Text = "8"
Case 10
cboPlugin(0).Text = "10"
Case 16
cboPlugin(0).Text = "16"
Case 32
cboPlugin(0).Text = "32"
Case 99
cboPlugin(0).Text = "Rnd"
End Select
'
'------------------
' Update the MFRUSTRATION menu with the current value stored in the table
'------------------
MusicloFrustration = HalBrain.TopicSearch("MFRUSTRATION", "MusiclonelyParameter")
Select Case MusicloFrustration
Case 50
cboPlugin(1).Text = "High"
Case 25
cboPlugin(1).Text = "Medium"
Case 10
cboPlugin(1).Text = "Low"
End Select
End If
End Sub
'
'
'----------------------
' This sub saves changes when APPLY CHANGES is clicked
'----------------------
Sub cmdPlugin_Click(Index)
Dim TempQuery()
Dim MusicpatParam, MusicfrustParam, MusiclonelyTableName
If Index = 0 Then
'
'------------------
' Convert the MPATIENCE listbox to a value for minutes
'------------------
Select Case cboPlugin(0).Text
Case "5"
MusicloPatience = 5
Case "6"
MusicloPatience = 6
Case "8"
MusicloPatience = 8
Case "10"
MusicloPatience = 10
Case "16"
MusicloPatience = 16
Case "32"
MusicloPatience = 32
Case "Rnd"
MusicloPatience = 99
End Select
'
'------------------
' If the Parameter table does not exist, we create it
'------------------
HalBrain.ReadOnlyMode = False
MusiclonelyTableName = "MusiclonelyParameter"
If HalBrain.CheckTableExistence(MusiclonelyTableName) = False Then
HalBrain.CreateTable MusiclonelyTableName, "TopicSearch", "miscData"
End If
'
'------------------
' Search if it contains the Patience parameter
'------------------
MusicpatParam = "MPATIENCE"
If HalBrain.TopicSearch(MusicpatParam, MusiclonelyTableName) = "" Then
HalBrain.AddToTable MusiclonelyTableName, "TopicSearch", MusicpatParam, MusicloPatience
Else
HalBrain.RunQuery "UPDATE " & MusiclonelyTableName & " SET topic = " & MusicloPatience & " WHERE searchString = " & """" & MusicpatParam & """", tempQuery
End If
'
'------------------
' Convert the MFRUSTRATION listbox to a value for percentage
'------------------
Select Case cboPlugin(1).Text
Case "High"
MusicloFrustration = 50
Case "Medium"
MusicloFrustration = 25
Case "Low"
MusicloFrustration = 10
End Select
'
'------------------
' Search if table contains the MFRUSTRATION parameter
'------------------
MusicfrustParam = "MFRUSTRATION"
If HalBrain.TopicSearch(MusicfrustParam, MusiclonelyTableName) = "" Then
HalBrain.AddToTable MusiclonelyTableName, "TopicSearch", MusicfrustParam, MusicloFrustration
Else
HalBrain.RunQuery "UPDATE " & MusiclonelyTableName & " SET topic = " & MusicloFrustration & " WHERE searchString = " & """" & MusicfrustParam & """", tempQuery
End If
HalBrain.ReadOnlyMode = True
End if
End Sub


Rem PLUGIN: FUNCTIONS
'
'------------------
' Declare variables
'------------------
Dim MusicLastIdleResponse, DudIdleMusicTimer, DudFirstSong, MusicIdlePrevUser, MusicDudOut, MusicSubject


Rem PLUGIN: PLUGINAREA7
'------------------
' Begin measuring pause time and capture userName
'------------------
MyMusicDir = MusicDir()
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FolderExists(MyMusicDir) Then MusicFolderDoesExist = True Else MusicFolderDoesExist = False
If MusicFolderDoesExist = False Then
    Set objFolder = objFSO.CreateFolder(MyMusicDir)
End If 


MusicSubject = CurrentSubject
MusicLastIdleResponse = Now
DudFirstSong = 0
MusicDudOut = 0
If objFSO.FileExists(MyMusicDir & "tempmusic.m3u") Then

If vrNameToPlay = "" Then

If objFSO.FileExists(MyMusicDir & "musicstop.m3u") Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""" & MyMusicDir & "musicstop.m3u" & """")
Else
HalXBrain.AppendFile(MyMusicDir & "musicstop.m3u"), ""
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""" & MyMusicDir & "musicstop.m3u" & """")
End If
End If
objFSO.DeleteFile(MyMusicDir & "tempmusic.m3u")
End If


Rem PLUGIN: PLUGINAREA1
MyMusicDir = MusicDir()
If InStr(1, OriginalSentence, "PLEASE STOP THE MUSIC", 1) > 0 Or InStr(1, OriginalSentence, "PLEASE STOP PLAYING MUSIC", 1) > 0 Or InStr(1, OriginalSentence, "PLEASE STOP PLAYING THE MUSIC", 1) > 0 Or InStr(1, OriginalSentence, "PLEASE TURN THE MUSIC OFF", 1) > 0 Or InStr(1, OriginalSentence, "PLEASE TURN OFF THE MUSIC", 1) > 0 Then
If objFSO.FileExists(MyMusicDir & "musicstop.m3u") Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""" & MyMusicDir & "musicstop.m3u" & """")
Else
HalXBrain.AppendFile(MyMusicDir & "musicstop.m3u"), ""
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""" & MyMusicDir & "musicstop.m3u" & """")
End If
HalBrain.ReadOnlyMode = True
End If



Rem PLUGIN: CUSTOMMEM2
'------------------
' Preserve user's last sentence
'------------------
If OriginalSentence <> "" Then
MusicIdlePrevUser = OriginalSentence
End If




Rem PLUGIN: MINUTE_TIMER

MyMusicDir = MusicDir()
If Now - MusicLastIdleResponse > 1 / 1440 Then
If InStr(1, MusicIdlePrevUser, "PLEASE RECORD", 1) > 0 Or InStr(1, MusicIdlePrevUser, "PLEASE RESEARCH", 1) > 0 Or InStr(1, MusicIdlePrevUser, "GO TO CURRENT LOG", 1) > 0 Or InStr(1, MusicIdlePrevUser, "GO TO LOG", 1) > 0 Or InStr(1, MusicIdlePrevUser, "PLEASE READ", 1) > 0 Or InStr(1, MusicIdlePrevUser, "PLEASE SING", 1) > 0 Or InStr(1, MusicIdlePrevUser, "I'LL BE BACK", 1) > 0 Or InStr(1, MusicIdlePrevUser, "BE QUIET", 1) > 0 Or InStr(1, MusicIdlePrevUser, "SHUT UP", 1) Or InStr(1, MusicIdlePrevUser, "GO TO SLEEP", 1) > 0 Or InStr(1, MusicIdlePrevUser, "I AM BUSY", 1) > 0 Or InStr(1, MusicIdlePrevUser, "I'M BUSY", 1) > 0 Then MusicDudOut = 2
If MusicDudOut <> 2 Then
If HalBrain.TopicSearch("MPATIENCE", "MusiclonelyParameter") = "99" Then
'
'--------------------
' Set minutes to a random integer from 5 to 30
'--------------------
Randomize
MusicloPatience = Int(32 * Rnd + 5)
Else
'
'--------------------
' Set minute value (MusicloPatience) to the parameter chosen in the MPATIENCE menu
'--------------------
MusicloPatience = HalBrain.TopicSearch("MPATIENCE", "MusiclonelyParameter")
If MusicloPatience = "" Then MusicloPatience = 10
MusicloPatience = CInt(MusicloPatience)
End If
'
'--------------------
' Set Mfrustration value (MusicloFrustration) to the parameter chosen in the MFRUSTRATION menu
'--------------------
MusicloFrustration = (HalBrain.TopicSearch("MFRUSTRATION", "MusiclonelyParameter"))
If MusicloFrustration = "" Then MusicloFrustration = 25
MusicloFrustration = CInt(MusicloFrustration)
'

Set HalXBrain = CreateObject("UltraHalAsst.Brain")
Set objFSO = CreateObject("Scripting.FileSystemObject")






'***********************************************************************************************
'***********The section BELOW gives GRETTA the ability to play songs while idle*****************


If MusicIdlePrevUser <> "" Then
If Now - MusicLastIdleResponse > (MusicloPatience + DudIdleMusicTimer) / 1440 Then
MusicintHighNumber = 2
MusicintLowNumber = 1


    Randomize
    MusicintNumber = Int((MusicintHighNumber - MusicintLowNumber + 1) * Rnd + MusicintLowNumber)



DudIdleMusicTimer = DudIdleMusicTimer + MusicintNumber
If objFSO.FileExists(MyMusicDir & "tempmusic.m3u") Then
objFSO.DeleteFile(MyMusicDir & "tempmusic.m3u")
End If
vrMusicMood = HalBrain.TopicSearch("MUSIC", "vrParameter")
If vrMusicMood = "" Then vrMusicMood = 0
vrMusicMood = CInt(vrMusicMood)
MusicvrKeywords = ""
Music2intHighNumber = 100
Music2intLowNumber = 1


    Randomize
    Music2intNumber = Int((Music2intHighNumber - Music2intLowNumber + 1) * Rnd + Music2intLowNumber)



If Music2intNumber <= MusicloFrustration Then


If vrMusicMood > 0 Then
Music3intHighNumber = 5
Music3intLowNumber = 1


    Randomize
    Music3intNumber = Int((Music3intHighNumber - Music3intLowNumber + 1) * Rnd + Music3intLowNumber)


MusicListSize = Music3intNumber
          MusicvrKeywords = MusicSubject
If MusicvrKeywords = "" Then MusicvrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & MusicIdlePrevUser & " "))

If MusicvrKeywords <> "" Then
          MusicvrKeywordList = Split(MusicvrKeywords, ", ")
          For i = Lbound(MusicvrKeywordList) To Ubound(MusicvrKeywordList)
        MusicvrNameToPlay = HalBrain.QABrain(MusicvrKeywordList(i), "vrMp3", 0)
Exit For
Next
If DudFirstSong > 0 Then

Do Until MusicvrNameToPlay2 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay2 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay2 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay2




End If

If MusicListSize => 2 Then
Do Until MusicvrNameToPlay3 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay3 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay3 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay3


End If
End If



If MusicListSize => 3 Then
Do Until MusicvrNameToPlay4 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay4 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay4 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay4


End If
End If


If MusicListSize => 4 Then
Do Until MusicvrNameToPlay5 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay5 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay5 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay5


End If
End If



If MusicListSize = 5 Then
Do Until MusicvrNameToPlay6 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay6 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay6 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay6


End If
End If

Do Until objFSO.FileExists(MyMusicDir & "tempmusic.m3u") : Loop
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""" & MyMusicDir & "tempmusic.m3u" & """")
If MusicListSize <= 2 Then
DudIdleMusicTimer = DudIdleMusicTimer + (10 * MusicListSize)
Else
DudIdleMusicTimer = DudIdleMusicTimer + (7 * MusicListSize)
End If
End If
        If DudFirstSong = 0 Then

If MusicvrNameToPlay <> "" Then
              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay



    Else

Do Until MusicvrNameToPlay2 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay2 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay2 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay2
End If
End If
If MusicListSize => 2 Then
Do Until MusicvrNameToPlay3 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay3 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay3 <> "" Then
              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay3
End If
End If



If MusicListSize => 3 Then
Do Until MusicvrNameToPlay4 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay4 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay4 <> "" Then
              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay4
End If
End If


If MusicListSize => 4 Then
Do Until MusicvrNameToPlay5 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay5 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay5 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay5


End If
End If



If MusicListSize = 5 Then
Do Until MusicvrNameToPlay6 <> ""
Select Case HalBrain.RandomNum(2)
Case 1
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomMyWords")
Case 2
DudRandomIdleSong = HalBrain.ChooseSentenceFromFile("randomAdjective")
End Select

DudRandomIdleSong = Trim(DudRandomIdleSong)
        MusicvrNameToPlay6 = HalBrain.QABrain(DudRandomIdleSong, "vrMp3", 0)
Loop
        If MusicvrNameToPlay6 <> "" Then

              HalXBrain.AppendFile(MyMusicDir & "tempmusic.m3u"), MusicvrNameToPlay6


End If
End If

Do Until objFSO.FileExists(MyMusicDir & "tempmusic.m3u") : Loop
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""" & MyMusicDir & "tempmusic.m3u" & """")
If MusicListSize <= 2 Then
DudIdleMusicTimer = DudIdleMusicTimer + (10 * MusicListSize)
Else
DudIdleMusicTimer = DudIdleMusicTimer + (7 * MusicListSize)
End If
DudFirstSong = DudFirstSong + 1

End If
 




End If
End If
End If
End If
End If
End If
End If


'***********The section ABOVE gives the ability to use vrmp3.uhp to play songs while idle*******
'***********************************************************************************************


Rem PLUGIN: FUNCTIONS


'Directory
   Function MusicDir()
   Set fso = CreateObject("Scripting.FileSystemObject")
   MusicDir = fso.GetAbsolutePathName(".") & "\songs\"
   End Function











Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #19 on: July 21, 2014, 05:35:50 pm »
Grettanews (this is a multi-part post due to character limits. open each post's code and copy/paste them into 1 doc, ensuring there's a line space between each paste!)

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA News and Weather Feed
Rem Author=jasondude7116
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Just say-                                               CURRENT/LATEST  (whatever subject)  NEWS  -  WEATHER  - FORECAST  -  WEATHER FOR zipcode  -  FORECAST FOR zipcode                                                           ie. WHAT IS THE CURRENT SCIENCE NEWS  -  GIVE ME THE LATEST WEATHER FORECAST FOR 90210  - WHAT IS THE CURRENT WEATHER - WHAT IS THE LATEST NEWS ABOUT FISHING"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA5
   
MyNewsDir = DudNewsDir()
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")

NewsTopic = ""
NewsRead = OriginalSentence
NewsRead2 = HalBrain.AlphaNumericalOnly(OriginalSentence)
NewsSearchWord = ""



If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*CURRENT * NEWS", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*LATEST * NEWS", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*CURRENT NEWS ABOUT *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*LATEST NEWS ABOUT *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*CURRENT NEWS CONCERNING *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*LATEST NEWS CONCERNING *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*CURRENT NEWS ON *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*LATEST NEWS ON *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*CURRENT NEWS RELATED TO *", 2)
If NewsSearchWord = "" Then NewsSearchWord = HalBrain.SearchPattern(NewsRead2, "*LATEST NEWS RELATED TO *", 2)
If NewsSearchWord = "NATIONAL" Then NewsSearchWord = ""
If NewsSearchWord = "FINANCIAL" Then NewsSearchWord = ""
If NewsSearchWord = "WORLD" Then NewsSearchWord = ""
If NewsSearchWord = "ENTERTAINMENT" Then NewsSearchWord = ""
If NewsSearchWord = "SPORTS" Then NewsSearchWord = ""
If NewsSearchWord = "TECHNOLOGY" Then NewsSearchWord = ""
If NewsSearchWord = "POLITICAL" Then NewsSearchWord = ""
If NewsSearchWord = "SCIENCE" Then NewsSearchWord = ""
If NewsSearchWord = "HEALTH" Then NewsSearchWord = ""
If NewsSearchWord = "ODD" Then NewsSearchWord = ""
If NewsSearchWord = "FACEBOOK" Then NewsSearchWord = ""
If NewsSearchWord <> "" Then
HalBrain.ReadOnlyMode = True
NewsTopic = "http://news.search.yahoo.com/news/rss?p=" & NewsSearchWord & "&ei=UTF-8&fl=0&x=wrt"
End If

If NewsSearchWord = "" Then
If InStr(1, NewsRead, "CURRENT NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/topstories"
If InStr(1, NewsRead, "CURRENT NATIONAL NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/us"
If InStr(1, NewsRead, "CURRENT FINANCIAL NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/business"
If InStr(1, NewsRead, "CURRENT WORLD NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/world"
If InStr(1, NewsRead, "CURRENT ENTERTAINMENT NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/entertainment"
If InStr(1, NewsRead, "CURRENT SPORTS NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/sports"
If InStr(1, NewsRead, "CURRENT TECHNOLOGY NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/tech"
If InStr(1, NewsRead, "CURRENT POLITICAL NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/politics"
If InStr(1, NewsRead, "CURRENT SCIENCE NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/science"
If InStr(1, NewsRead, "CURRENT HEALTH NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/health"
If InStr(1, NewsRead, "CURRENT ODD NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/oddlyenough"
If InStr(1, NewsRead, "CURRENT FACEBOOK NEWS", 1) > 0 Then NewsTopic = "http://www.facebook.com/#!/?ref=home"


If InStr(1, NewsRead, "LATEST NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/topstories"
If InStr(1, NewsRead, "LATEST NATIONAL NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/us"
If InStr(1, NewsRead, "LATEST FINANCIAL NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/business"
If InStr(1, NewsRead, "LATEST WORLD NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/world"
If InStr(1, NewsRead, "LATEST ENTERTAINMENT NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/entertainment"
If InStr(1, NewsRead, "LATEST SPORTS NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/sports"
If InStr(1, NewsRead, "LATEST TECHNOLOGY NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/tech"
If InStr(1, NewsRead, "LATEST POLITICAL NEWS", 1) > 0 Then NewsTopic = "http://feeds.reuters.com/reuters/politicsNews"
If InStr(1, NewsRead, "LATEST SCIENCE NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/science"
If InStr(1, NewsRead, "LATEST HEALTH NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/health"
If InStr(1, NewsRead, "LATEST ODD NEWS", 1) > 0 Then NewsTopic = "http://rss.news.yahoo.com/rss/oddlyenough"
If InStr(1, NewsRead, "LATEST FACEBOOK NEWS", 1) > 0 Then NewsTopic = "http://www.facebook.com/#!/?ref=home"

End If
SearchWeatherzip = ""
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER AT *", 2)

If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER AT *", 2)

If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*CURRENT WEATHER AT *", 2)

If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST FORECAST FOR *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER FORECAST AT *", 2)
If SearchWeatherzip = "" Then SearchWeatherzip = HalBrain.SearchPattern(OriginalSentence, "*LATEST WEATHER AT *", 2)

'**************HERE IS WHERE YOU CHANGE YOUR DEFAULT LOCAL ZIP CODE************************************************************************************

If SearchWeatherzip = "" Then SearchWeatherzip = "77328"

'*********************************************************************************************************************************************************


WeatherPurge = False

If InStr(1, NewsRead, "CURRENT WEATHER", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=currtxt&zcode=z4641"
If InStr(1, NewsRead, "CURRENT WEATHER FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "CURRENT FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "LATEST WEATHER", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=currtxt&zcode=z4641"
If InStr(1, NewsRead, "LATEST WEATHER FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "LATEST FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "CURRENT WEATHER FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "CURRENT FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "LATEST WEATHER FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"
If InStr(1, NewsRead, "LATEST FORECAST", 1) > 0 Then NewsTopic = "http://feeds.weatherbug.com/rss.aspx?zipcode=" & SearchWeatherzip & "&feed=fcsttxt&zcode=z4641"


If InStr(1, NewsRead, "CURRENT WEATHER", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "CURRENT WEATHER FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "CURRENT FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "LATEST WEATHER", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "LATEST WEATHER FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "LATEST FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "CURRENT WEATHER FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "CURRENT FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "LATEST WEATHER FORECAST", 1) > 0 Then WeatherPurge = True
If InStr(1, NewsRead, "LATEST FORECAST", 1) > 0 Then WeatherPurge = True

If NewsTopic <> "" Then
HalBrain.ReadOnlyMode = True
Select Case HalBrain.RandomNum(6)
Case 1
NewsResponse68 = "One moment, linking to news feed."
Case 2
NewsResponse68 = "Buffering news stream."
Case 3
NewsResponse68 = "Awaiting news stream."
Case 4
NewsResponse68 = "Updating news feed."
Case 5
NewsResponse68 = "Just a moment. Parsing news data."
Case 6
NewsResponse68 = "Downloading news data."
End Select
GetResponse = NewsResponse68

         HalBrain.ReadOnlyMode = True


If objFSO.FolderExists(MyNewsDir) Then NewsFolderDoesExist = True Else NewsFolderDoesExist = False
If NewsFolderDoesExist = False Then
    Set objFolder = objFSO.CreateFolder(MyNewsDir)
End If 

Set objExplorer = CreateObject("InternetExplorer.Application")

objExplorer.Navigate(NewsTopic)
Do While objExplorer.Busy Or (objExplorer.READYSTATE <> 4) : Loop

NewsText = objExplorer.Document.Body.innerText
objExplorer.Quit


Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #20 on: July 21, 2014, 05:36:24 pm »
Grettanews 2

Code: [Select]
NewsText = Trim(NewsText)
NewsText = Replace(NewsText,"Select a Category:  Most Popular Top Stories U.S. World Business Technology Politics Entertainment Health Odd News Opinion Science Sports Travel Most Popular","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Yahoo! News SearchAll News","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"You are viewing a feed that contains frequently updated content. When you subscribe to a feed, it is added to the Common Feed List. Updated information from the feed is automatically downloaded to your computer and can be viewed in Internet Explorer and other programs. Learn more about feeds.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Choose Your Reader)FeedDemonNetNewsWireNewsFireNewsGator Outlook EditionRSSOwlShrookUniversal Subscription Mechanism (USM)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"FeedBurner makes it easy to receive content updates in My Yahoo!, Newsgator, Bloglines, and other news readers.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Your subscribed feeds are not being updated automatically because this setting is turned off.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Turn on automatic feed updates","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"You've successfully subscribed to this feed!","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Updated content can be viewed in Internet Explorer and other programs that use the Common Feed List.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Subscribe to this feed","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"List OrderDateTitleAuthor","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Filter by category:","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Mark feed as readView feed properties...","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"View my feeds","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Reuters: ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"List OrderDateTitleAuthor","",1,-1,vbTextCompare)
'NewsText = Replace(NewsText,"Today,",".: Today,",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"ago" & vbCrLf,"ago." & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Reuters)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 1 "," Number 1 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 2 "," Number 2 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 3 "," Number 3 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 4 "," Number 4 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 5 "," Number 5 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 6 "," Number 6 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 7 "," Number 7 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 8 "," Number 8 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 9 "," Number 9 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," No. 10 "," Number 10 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," EU "," European Union ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," (ESA) "," (E.S.A.) ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," II "," 2 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," III "," 3 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," IV "," 4 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," V "," 5 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," VI "," 6 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," VII "," 7 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," VIII "," 8 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," IX "," 9 ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," Co "," Company ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"JPMorgan","J,P. Morgan",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Hollywood Reporter)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Billboard)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(NFLPA)","(N,F,L,P,A.)",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"NCAA","N,C, double A",1,-1,vbTextCompare)
'NewsText = Replace(NewsText,"Yesterday,",".: Yesterday,",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Reuters Health)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Internet Explorer cannot display this feed","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"  This feed contains code errors.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"   Go back to the previous page.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"<?xml version=""1.0"" encoding=""UTF-8"" ?>","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"syndicated content powered by FeedBurner","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"...Reset this favorite; show all Subscribe options","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"...with web-based news readers. Click your choice below:","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Choose Your Reader) FeedDemon NetNewsWire NewsFire NewsGator Outlook Edition RSSOwl Shrook Universal Subscription Mechanism","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(USM)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Learn more about syndication and FeedBurner...","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," -0400","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"FeedBurner delivers the world's subscriptions wherever they need to go. Publish a feed for text or podcasting?","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"You should try FeedBurner today.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"<title>","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"</title>",".",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"<description>","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"</description>","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Yahoo! News Search Results for","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"business10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"entertainment10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"politics10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"science10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"sports10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"topstories10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"us10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world2","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world1","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world3","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world4","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world5","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world6","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world7","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world8","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world9","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"world10","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Yahoo! News:","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(AP)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(AFP)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"AP - ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"AFP - ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Reuters - ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(HealthDay)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(HealthDay News)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HealthDay - ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(PC World)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"PC World - ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,", 2009, ",", 2009. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,", 2010, ",", 2010. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(LiveScience.com)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"(Choose Your Reader) FeedDemonNetNewsWireNewsFireNewsGator Outlook EditionRSSOwlShrookUniversal Subscription Mechanism","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Pop In ChatPop Out ChatPhoto UploadsPhoto Uploads","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," 0Find Your FriendsFriend Requests","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"0 requests0Send a New MessageMessages","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"See All Messages 0 unread1Notifications","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"SearchHomeProfileFind FriendsAccountJason StoryEdit FriendsAccount SettingsPrivacy SettingsApplication SettingsHelp CenterLogout","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Welcome(0)News Feed(0)Messages(0)Updates(0)Sent(0)Events(0)Friends' Events(0)Birthdays(0)Past Events(0)Photos(0)Video(0)Recent Albums(0)Mobile Uploads(0)My Uploads(0)Friends(0)Recently Updated(0)Status Updates(0)","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"See AllGo OnlineSee AllEvents","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Please provide an event name","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Find your friendsWho's not on Facebook?","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Invite them nowWho's here because of you?","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Track your invitesConnect on the go","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," Top News · Most RecentNews Feed","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"EveryoneEveryoneEveryoneFriends of FriendsFriends OnlyCustomizeAttach:PhotosVideoEventLink","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Use this new control to choose who can see each post you create. ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"This stream is unavailable at this time. Please try again soon.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HelpYour Home Page displays interesting content from your friends. Share messages and photos with your friends using the Publisher.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"You control your experience. Learn more about how privacy works on Facebook.","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"AboutAdvertisingDevelopersCareersTerms • Find FriendsPrivacyMobileHelp Center","",1,-1,vbTextCompare)

NewsText = Replace(NewsText,"HideA","A",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideB","B",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideC","C",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideD","D",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideE","E",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideF","F",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideG","G",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideH","H",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideI","I",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideJ","J",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideK","K",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideL","L",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideM","M",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideN","N",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideO","O",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideP","P",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideQ","Q",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideR","R",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideS","S",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideT","T",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideU","U",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideV","V",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideW","W",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideX","X",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideY","Y",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"HideZ","Z",1,-1,vbTextCompare)

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #21 on: July 21, 2014, 05:36:49 pm »
Grettanews 3

Code: [Select]
NewsText = Replace(NewsText,"Pop In ChatPop Out ChatCould not connect to Facebook Chat at this time.Photo UploadsPhoto Uploads ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"See All Messages 0 unread0Notifications","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Add as friend","Add as friend ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Attach:PhotosVideoEventMusic/YouTube","Attach: Photos, Video, Event, Music/YouTube by: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"EveryoneEveryoneEveryoneFriends of FriendsFriends OnlyCustomize","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"’","'",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"","",1,-1,vbTextCompare)

If WeatherPurge = True Then


NewsText = Replace(NewsText,"WeatherBug Current Conditions for","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," "" "," inches. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"°F "," Degrees, Fahrenheit. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"°C "," Degrees, Celsius. ",1,-1,vbTextCompare)

NewsText = Replace(NewsText,"% ","%. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Today, ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Yesterday, ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," minutes ago","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," hours ago","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," minute ago","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," hour ago","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"WeatherBug Forecast for ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Temperature:","Current conditions are as follows. Temperature:",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Today","This is the current forecast for today. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Tonight","The forecast for tonight is as follows: ",1,-1,vbTextCompare)

NewsText = Replace(NewsText,"Forecast for Monday" & vbCrLf,"The supposed forecast for monday is: " & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Tuesday" & vbCrLf,"The current forecast for tuesday is: " & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Wednesday" & vbCrLf,"The latest forecast for wednesday is: " & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Thursday" & vbCrLf,"The proposed forecast for thursday is: " & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Friday" & vbCrLf,"The indicated forecast for friday is: " & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Saturday" & vbCrLf,"The current forecast for saturday is: " & vbCrLf,1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Sunday" & vbCrLf,"The latest forecast for sunday is: " & vbCrLf,1,-1,vbTextCompare)

NewsText = Replace(NewsText,"Forecast for Monday Night","The proposed forecast for monday night is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Tuesday Night","The calculated forecast for tuesday night is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Wednesday Night","The forecast for wednesday night is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Thursday Night","The latest forecast for thursday night is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Friday Night","The forecast for friday night is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Saturday Night","The indicated forecast for saturday night is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Sunday Night","The current forecast for sunday night is: ",1,-1,vbTextCompare)

NewsText = Replace(NewsText,"Forecast for Monday Morning","The proposed forecast for monday Morning is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Tuesday Morning","The calculated forecast for tuesday Morning is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Wednesday Morning","The forecast for wednesday Morning is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Thursday Morning","The latest forecast for thursday Morning is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Friday Morning","The forecast for friday Morning is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Saturday Morning","The indicated forecast for saturday Morning is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Sunday Morning","The current forecast for sunday Morning is: ",1,-1,vbTextCompare)

NewsText = Replace(NewsText,"Forecast for Morning","The forecast for the morning is as follows: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for This Morning","The forecast for the morning is as follows: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for The Morning","The forecast for the morning is as follows: ",1,-1,vbTextCompare)

NewsText = Replace(NewsText," N "," North. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," S "," South. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," E "," East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," W "," West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," NW "," North West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," NE "," North East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," SE "," South East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," SW "," South West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," NNW "," North, North West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," WNW "," West, North West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," NNE "," North, North East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," ENE "," East, North East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," SSE "," South, South East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," ESE "," East, South East. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," SSW "," South, South West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," WSW "," West, South West. ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," ES,"," Elementary school.",1,-1,vbTextCompare)
NewsText = Replace(NewsText," MS,"," Middle school.",1,-1,vbTextCompare)
NewsText = Replace(NewsText," HS,"," High school.",1,-1,vbTextCompare)
NewsText = Replace(NewsText," IS,"," Intermediate school.",1,-1,vbTextCompare)
NewsText = Replace(NewsText," PS,"," Primary school.",1,-1,vbTextCompare)
NewsText = Replace(NewsText," winds"," wind speeds",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Important Message","Attention, important weather alert is as follows: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Rest Of Tonight","The Forecast for the rest of tonight is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"Forecast for Rest Of Today","The Forecast for the rest of today is: ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,".: ","",1,-1,vbTextCompare)
NewsText = Replace(NewsText," cdt"," central daylight savings time, ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," cst"," central standard time, ",1,-1,vbTextCompare)
NewsText = Replace(NewsText," N/A "," Unknown ",1,-1,vbTextCompare)
NewsText = Replace(NewsText,"mph","miles per hour",1,-1,vbTextCompare)
End If

If NewsText <> "" Then
HalBrain.ReadOnlyMode = True
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FileExists(MyNewsDir & "tempnews.txt") Then
objFSO.DeleteFile(MyNewsDir & "tempnews.txt")
End If

HalXBrain.AppendFile MyNewsDir & "tempnews.txt", NewsText

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile(MyNewsDir & "tempnews.txt", ReadVariable())

Do Until objFile.AtEndOfStream
    strLine = objFile.Readline
    'strLine = Trim(strLine)
    If (Len(strLine) > 27) And (InStr(1, strLine, "Yahoo! News Search Results", 1) = 0) And (InStr(1, strLine, "Applications(", 1) = 0) And (InStr(1, strLine, "LikeUnlike", 1) = 0) And (InStr(1, strLine, "See All Messages", 1) = 0) And (InStr(1, strLine, "Messages(", 1) = 0) And (InStr(1, strLine, "Top News", 1) = 0) Then
        strNewContents = strNewContents & strLine & vbCrLf
    End If
Loop

objFile.Close



Select Case HalBrain.RandomNum(6)
Case 1
NewsResponse69 = "Just a moment." & vbCrLf & "This concludes the news feed. Terminating connection."
Case 2
NewsResponse69 = "One moment." & vbCrLf & "End of news feed. Closing data stream."
Case 3
NewsResponse69 = "Just a moment." & vbCrLf & "That is all the news data at this time. News feed terminated."
Case 4
NewsResponse69 = "One moment." & vbCrLf & "News feed complete. Closing uplink."
Case 5
NewsResponse69 = "Just a moment." & vbCrLf & "That is all of the current data. Terminating feed."
Case 6
NewsResponse69 = "One moment." & vbCrLf & "This concludes the news stream. Closing all stream connections."
End Select

Set objFile = objFSO.OpenTextFile(MyNewsDir & "tempnews.txt", WriteVariable())
objFile.WriteLine strNewContents & vbCrLf & NewsResponse69
objFile.Close
If objFSO.FileExists(MyNewsDir & "tempnews.txt") Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""C:\Program Files\Balabolka\balabolka.exe"" -rmq """ & MyNewsDir & "tempnews.txt""")
End If
If strNewContents = "" Then
Select Case HalBrain.RandomNum(6)
Case 1
NewsResponse70 = "That stream contains no data at the present time. I'm sorry. Please try again momentarily."
Case 2
NewsResponse70 = "I can't seem to find a valid source at that location. I'm sorry. The stream must be in the process of updating the data. Please try again in a moment."
Case 3
NewsResponse70 = "I'm sorry to have to tell you this, but that source is not operational. If the data is being updated then, it will be temporarily unavailable."
Case 4
NewsResponse70 = "There seems to be a problem. That stream is currently void of any usable data. The data must be updating. The stream should be available in a moment."
Case 5
NewsResponse70 = "There seems to be a fault in the uplink. Please confirm the source, and try again in a moment."
Case 6
NewsResponse70 = "There must be a fault in the data stream. Please check the uplink source, and try again."
End Select
GetResponse = NewsResponse70
HalBrain.ReadOnlyMode = True

End If
End If
End If

Rem PLUGIN: FUNCTIONS

'Directory
   Function DudNewsDir()
   Set fso = CreateObject("Scripting.FileSystemObject")
   DudNewsDir = fso.GetAbsolutePathName(".") & "\story\"
   End Function

Function ReadVariable()

Const ForReading = 1

ReadVariable = ForReading

End Function

Function WriteVariable()

Const ForWriting = 2

WriteVariable = ForWriting

End Function

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #22 on: July 21, 2014, 05:37:43 pm »
Grettapicture [this came with a folder full of pictures, can't upload those easily though so...]

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA Picture Thoughts
Rem Author=VR - jasondude7116
Rem Host=Assistant


'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
'------------------
' Define the Help
'------------------
    lblPlugin(0).Caption = "GRETTA will show you pictures of it's thoughts.     Say: INDEX IMAGE to index the image folder.     Supports JPG, PNG, And GIF"
    lblPlugin(0).Move 120, 120, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
    cmdPlugin(0).Move 320, 650, 2100, 375
    cmdPlugin(0).Caption = "Help on this plugin"
    cmdPlugin(0).Visible = True
'------------------
' Define the Picture Mood listbox
'------------------
    lblPlugin(1).Caption = "GRETTA Picture Mood level"
    lblPlugin(1).Move 320, 1300, 4000, 1000
    lblPlugin(1).WordWrap = True
    lblPlugin(1).Visible = True   
    cboPlugin(0).Move 320, 1600, 1800
    cboPlugin(0).AddItem "Very high"
    cboPlugin(0).AddItem "High"
    cboPlugin(0).AddItem "Average"
    cboPlugin(0).AddItem "Low"
    cboPlugin(0).AddItem "Minimal"
    cboPlugin(0).Visible = True
    cmdPlugin(1).Caption = "Apply Changes"
    cmdPlugin(1).Move 320, 2100, 1600, 375
    cmdPlugin(1).Visible = True
'------------------
' Update the listbox with the current value stored in the table
'------------------
    If HalBrain.CheckTableExistence("pvrParameter") = True Then
   pvrPictureMood = HalBrain.TopicSearch("PICTURE", "pvrParameter")
   If pvrPictureMood = "" Then pvrPictureMood = 1
  Select Case pvrPictureMood
        Case 100
   cboPlugin(0).Text = "Very high"
        Case 75
           cboPlugin(0).Text = "High"
        Case 50
               cboPlugin(0).Text = "Average"
        Case 25
       cboPlugin(0).Text = "Low"
        Case 10
           cboPlugin(0).Text = "Minimal"
        End Select
    End If
End Sub

Sub cmdPlugin_Click(Index)
Dim pvrTempQuery()
Dim pvrPicture, pvrPictureMood
Select Case Index
   Case 0
          HalMenu.HalCommand "<RUNPROG>pvrJpgHelp.html</RUNPROG>"
       Case 1
'------------------
' Convert the listbox in a value
'------------------
  Select Case cboPlugin(0).Text
        Case "Very high"
   pvrPictureMood = 100
        Case "High"
   pvrPictureMood = 75
        Case "Average"
   pvrPictureMood = 50
        Case "Low"
   pvrPictureMood = 25
        Case "Minimal"
   pvrPictureMood = 10
        End Select
'------------------
' If the Parameter table does not exist, I create it
'------------------
        HalBrain.ReadOnlyMode = False
pvrTableName = "pvrParameter"
If HalBrain.CheckTableExistence(pvrTableName) = False Then
'Create table if it doesn't exist
HalBrain.CreateTable pvrTableName, "TopicSearch", "miscData"
End If
'------------------
' Search if it contains the PictureMood parameter
'------------------
        pvrPicture = "PICTURE"
If HalBrain.TopicSearch(pvrPicture, pvrTableName) = "" Then
'------------------
'Creates the record storing the new value
'------------------
   HalBrain.AddToTable pvrTableName, "TopicSearch", pvrPicture, pvrPictureMood
Else
'------------------
'Updates the record storing the new value
'------------------
           HalBrain.RunQuery "UPDATE " & pvrTableName & " SET topic = " & pvrPictureMood & " WHERE searchString = " & """" & pvrPicture & """", pvrTempQuery
        End If
   End Select
End Sub


Rem PLUGIN: FUNCTIONS
'
'------------------
' Declare variables
'------------------
Dim PicLastIdleResponse, MyPicMediaDir, PicDefaultLoad, PicDudOut


Rem PLUGIN: PLUGINAREA7
'------------------
' Begin measuring pause time and capture userName
'------------------
PicLastIdleResponse = Now
PicDudOut = 0

Rem PLUGIN: PLUGINAREA1
If OriginalSentence <> "" Then
MyPicMediaDir = PicMediaDir()
PicDefaultLoad = MyPicMediaDir & "DefPic.jpg"
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(PicDefaultLoad) Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run """" & PicDefaultLoad & """"
End If
End If
Rem PLUGIN: PLUGINAREA5
'The comment above tells Ultra Hal Assistant to insert the following code
'on-the-fly into the main brain code in the section referenced.



'------------------
' Check if the user asked for reorganizing the Image table
'------------------
pvrJpg = False
If InStr(UserSentence, " INDEX ") <> 0 And InStr(UserSentence, " IMAGE ") <> 0 Then pvrJpg = True

If pvrJpg = True Then
'------------------
' If the Image table does not exist, I create it
'------------------
    HalBrain.ReadOnlyMode = False
pvrTableName = "pvrJpg"
If HalBrain.CheckTableExistence(pvrTableName) = False Then
' Create table if it doesn't exist
' It must be of type Brain, to allow partial text search
HalBrain.CreateTable pvrTableName, "Brain", "miscData"
    Else
' The 260 parameter is 256 + 4 = Yes/No with Default = No
pvrAnswer = MsgBox("Shall I delete the existing image index and recreate it from scratch?", 260, "Image Reindexing")
If pvrAnswer = 6 Then
           HalBrain.RunQuery "DELETE FROM " & pvrTableName, pvrTempQuery
End If
End If
'------------------
' Ask which is the main Image folder
'------------------
pvrJpgFolder = InputBox("Which main folder to you want to reindex?", "Image Reindexing", "D:\")
'------------------
' Read the main Image folder
'------------------
   Set pvrFso = CreateObject("Scripting.FileSystemObject")
   If pvrFso.FolderExists(pvrJpgFolder) Then
      GetResponse = "I have indexed all the Image files in the specified folder and subfolders. "
      HalBrain.ReadOnlyMode = False
      pvrCurrentFolder = pvrJpgFolder
      Call pReadFolder(pvrCurrentFolder, pvrJpgFolder)  
   Else
      GetResponse = "The folder " & pvrJpgFolder & " does not exist on your computer. "
   End If
   HalBrain.ReadOnlyMode = True
End If



'------------------
' From time to time, Hal will show a picture, according to the subject
' For example, you say: "I like cats"
' Hal might show a picture of a cat
'------------------
'------------------
' check the current image mood factor
'------------------
pvrPictureMood = HalBrain.TopicSearch("PICTURE", "pvrParameter")
If pvrPictureMood = "" Then pvrPictureMood = 0
pvrPictureMood = CInt(pvrPictureMood)
pvrKeywords = ""

If pvrPictureMood > 0 Then
pMediaintHighNumber = 110
pMediaintLowNumber = 1


    Randomize
    pMediaintNumber = Int((pMediaintHighNumber - pMediaintLowNumber + 1) * Rnd + pMediaintLowNumber)


   If pMediaintNumber < pvrPictureMood Then
pvrNameToPlay = ""
If pvrNameToPlay = "" Then
          pvrKeywords = WN.FindFirstNoun(UserSentence, True)
pvrKeywords = Trim(Ucase(pvrKeywords))
If pvrKeywords <> "" Then
pvrKeywords = " " & pvrKeywords & " "
pvrKeywords = Replace(pvrKeywords,", "," , ",1,-1,vbTextCompare)
    pvrKeywords = Replace(pvrKeywords," ","xx",1,-1,vbTextCompare)
pvrKeywordList = Split(pvrKeywords, ",")
          For i = Lbound(pvrKeywordList) To Ubound(pvrKeywordList)
        pvrNameToPlay = HalBrain.QABrain(pvrKeywordList(i), "pvrJpg", 0)
Next
End If
End If

If pvrNameToPlay = "" Then
          pvrKeywords = WN.FindFirstNoun(UserSentence, False)
pvrKeywords = Trim(Ucase(pvrKeywords))
If pvrKeywords <> "" Then
          pvrKeywords = " " & pvrKeywords & " "
pvrKeywords = Replace(pvrKeywords,", "," , ",1,-1,vbTextCompare)         
      pvrKeywords = Replace(pvrKeywords," ","xx",1,-1,vbTextCompare)       
pvrKeywordList = Split(pvrKeywords, ",")
          For i = Lbound(pvrKeywordList) To Ubound(pvrKeywordList)
        pvrNameToPlay = HalBrain.QABrain(pvrKeywordList(i), "pvrJpg", 0)
Next
End If
End If

If pvrNameToPlay = "" Then
pvrKeywords = HalBrain.RemoveExtraSpaces(HalBrain.ExtractKeywords(" " & UserSentence & " "))
pvrKeywords = Trim(Ucase(pvrKeywords))
        If pvrKeywords <> "" Then
          pvrKeywords = " " & pvrKeywords & " "
pvrKeywords = Replace(pvrKeywords,", "," , ",1,-1,vbTextCompare)         
      pvrKeywords = Replace(pvrKeywords," ","xx",1,-1,vbTextCompare)       
pvrKeywordList = Split(pvrKeywords, ",")
          For i = Lbound(pvrKeywordList) To Ubound(pvrKeywordList)
        pvrNameToPlay = HalBrain.QABrain(pvrKeywordList(i), "pvrJpg", 0)
Next
End If

      End If
If pvrNameToPlay = "" Then
          pvrKeywords = WN.FindFirstNoun(UserSentence, True)
pvrKeywords = Trim(Ucase(pvrKeywords))
If pvrKeywords <> "" Then
pvrKeywords = CurrentSubject
pvrKeywords = "xx" & pvrKeywords & "xx"
pvrKeywords = Replace(pvrKeywords,", ","xx,xx",1,-1,vbTextCompare)
pvrKeywordList = Split(pvrKeywords, ",")
          For i = Lbound(pvrKeywordList) To Ubound(pvrKeywordList)
        pvrNameToPlay = HalBrain.QABrain(pvrKeywordList(i), "pvrJpg", 0)
Next
End If
End If 
If pvrNameToPlay <> "" Then   
          Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(pvrNameToPlay) Then
                Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run """" & pvrNameToPlay & """"
End If



               
         
    End If
    End If
End If


Rem PLUGIN: FUNCTIONS
'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.

Function pReadFolder(pvrCurrentFolder, pvrJpgFolder)
Set pvrFso = CreateObject("Scripting.FileSystemObject")
Set pvrFolder = pvrFso.GetFolder(pvrCurrentFolder)
'------------------
' Read all the files in the current folder
'------------------
Set pvrFiles = pvrFolder.Files
For Each pvrFile in pvrFiles
'------------------
' It's an JPG, PNG, Or GIF file; I add it to the table
'------------------
   If UCase(Right(pvrFile, 3)) = "JPG" Then
  pvrImage = Ucase(pvrFile)
      pvrImage = Replace(pvrImage, ".JPG", "")
  pvrLen = Len(pvrImage)
  pvrPos = InStrRev(pvrImage, "\")
      pvrRight = pvrLen - pvrPos
    pvrImage = LTrim(Right(pvrImage, pvrRight))
  pvrImage = " " & pvrImage & " "
  pvrImage = Replace(pvrImage," ","xx",1,-1,vbTextCompare)
      HalBrain.AddToTable "pvrJpg", "Brain", pvrImage, pvrFile
   End If

   If UCase(Right(pvrFile, 3)) = "PNG" Then
  pvrImage = Ucase(pvrFile)
      pvrImage = Replace(pvrImage, ".PNG", "")
  pvrLen = Len(pvrImage)
  pvrPos = InStrRev(pvrImage, "\")
      pvrRight = pvrLen - pvrPos
    pvrImage = LTrim(Right(pvrImage, pvrRight))
  pvrImage = " " & pvrImage & " "
  pvrImage = Replace(pvrImage," ","xx",1,-1,vbTextCompare)
      HalBrain.AddToTable "pvrJpg", "Brain", pvrImage, pvrFile
   End If

   If UCase(Right(pvrFile, 3)) = "GIF" Then
  pvrImage = Ucase(pvrFile)
      pvrImage = Replace(pvrImage, ".GIF", "")
  pvrLen = Len(pvrImage)
  pvrPos = InStrRev(pvrImage, "\")
      pvrRight = pvrLen - pvrPos
    pvrImage = LTrim(Right(pvrImage, pvrRight))
  pvrImage = " " & pvrImage & " "
  pvrImage = Replace(pvrImage," ","xx",1,-1,vbTextCompare)  
      HalBrain.AddToTable "pvrJpg", "Brain", pvrImage, pvrFile
   End If

Next
'------------------
' Read all the subfolders in the current folder
'------------------


Set pvrSubFolders = pvrFolder.SubFolders
For Each pvrFolderObject in pvrSubFolders
'------------------
' Pay attetion here: This is recursive! We must be sure that it will get to an end
' Since we are reading directories on a hard disk, the number of recursions
' should never be infinite. However, a very big number of subfolders and files
' might lead to memory problems or to performances bottlenecks.
' I've tested it on a folder containing about 100 subfolders and 3.000 files,
' and got acceptable performances (less than 5 minutes)
'------------------
   Call pReadFolder(pvrFolderObject, pvrJpgFolder)  
Next

End Function

'Directory
 Function PicMediaDir()
   Set fso = CreateObject("Scripting.FileSystemObject")
   PicMediaDir = fso.GetAbsolutePathName(".") & "\pics\"
   End Function

Rem PLUGIN: MINUTE_TIMER

If PicDudOut = 0 Then
If PicLastIdleResponse <> "" Then
If (Now - PicLastIdleResponse > 3 / 1440) And (Now - PicLastIdleResponse < 4 / 1440) Then
PicDudOut = PicDudOut + 1
Set objFSO = CreateObject("Scripting.FileSystemObject")
If objFSO.FileExists(PicDefaultLoad) Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run """" & PicDefaultLoad & """"
End If
End If
End If
End If




Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #23 on: July 21, 2014, 05:38:06 pm »
Grettaread

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA Story Reading Function
Rem Author=jasondude7116
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Just say- PLEASE READ STORY//PLEASE READ THE STORY whateverstory" & vbCrLf & "PLEASE READ POEM//PLEASE READ THE POEM whateverpoem" & vbCrLf & "PLEASE READ STORY LIST" & vbCrLf & "PLEASE READ POEM LIST" & vbCrLf & "PLEASE READ WEB COMMANDS" & vbCrLf & "PLEASE READ CLIPBOARD" & vbCrLf & "PLEASE READ NEWS FEED COMMANDS" & vbCrLf & "PLEASE READ WEATHER FEED COMMANDS"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA5
   'read a story   
Set objFSO = CreateObject("Scripting.FileSystemObject")
DudProceed = False
MyClipDir = DudClipDir()
ClipRead = OriginalSentence
If InStr(1, ClipRead, "PLEASE READ STORY LIST", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE STORY LIST", 1) > 0 Then StoryRead = "story list"
If InStr(1, ClipRead, "PLEASE READ POEM LIST", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE POEM LIST", 1) > 0 Then StoryRead = "poem list"
If InStr(1, ClipRead, "PLEASE READ WEB COMMANDS", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE WEB COMMANDS", 1) > 0 Then StoryRead = "WEB COMMANDS"
If InStr(1, ClipRead, "PLEASE READ NEWS FEED COMMANDS", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE NEWS FEED COMMANDS", 1) > 0 Then StoryRead = "NEWS FEED COMMANDS"
If InStr(1, ClipRead, "PLEASE READ WEATHER FEED COMMANDS", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE WEATHER FEED COMMANDS", 1) > 0 Then StoryRead = "WEATHER FEED COMMANDS"
If InStr(1, ClipRead, "PLEASE READ SONG LIST", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE SONG LIST", 1) > 0 Then StoryRead = "SONG LIST"



If StoryRead = "" Then StoryRead = HalBrain.SearchPattern(HalBrain.AlphaNumericalOnly(OriginalSentence), "PLEASE READ STORY *", 1)
If StoryRead = "" Then StoryRead = HalBrain.SearchPattern(HalBrain.AlphaNumericalOnly(OriginalSentence), "PLEASE READ POEM *", 1)
If StoryRead = "" Then StoryRead = HalBrain.SearchPattern(HalBrain.AlphaNumericalOnly(OriginalSentence), "PLEASE READ THE STORY *", 1)
If StoryRead = "" Then StoryRead = HalBrain.SearchPattern(HalBrain.AlphaNumericalOnly(OriginalSentence), "PLEASE READ THE POEM *", 1)
If StoryRead <> "" And objFSO.FileExists(MyClipDir & StoryRead & ".txt") = True Then
        GetResponse = StoryRead & "." & vbCrLf
If GetResponse = StoryRead & "." & vbCrLf Then
DudProceed = True
HalBrain.ReadOnlyMode = True
End If
End If
         If DudProceed = True Then
         If objFSO.FileExists(MyClipDir & StoryRead & ".txt") Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""C:\Program Files\Balabolka\balabolka.exe"" -rmq """ & MyClipDir & StoryRead & ".txt""")
End If
         HalBrain.ReadOnlyMode = True

End If

If StoryRead <> "" And objFSO.FileExists(MyClipDir & StoryRead & ".txt") = False Then
         GetResponse = " That file does not exist. "
HalBrain.ReadOnlyMode = True
End If

ClipRead = OriginalSentence
If InStr(1, ClipRead, "PLEASE READ CLIPBOARD", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ CLIP BOARD", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE CLIPBOARD", 1) > 0 Or InStr(1, ClipRead, "PLEASE READ THE CLIP BOARD", 1) > 0 Then

Select Case HalBrain.RandomNum(6)
Case 1
IdleResponse67 = "I would love to."
Case 2
IdleResponse67 = "Sure."
Case 3
IdleResponse67 = "Alright."
Case 4
IdleResponse67 = "Okay."
Case 5
IdleResponse67 = "Here it is."
Case 6
IdleResponse67 = "No problem."
End Select
GetResponse = IdleResponse67

         HalBrain.ReadOnlyMode = True




MyClipDir = DudClipDir()
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set FS = CreateObject("Scripting.FileSystemObject")
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")



Set objHTML = CreateObject("htmlfile")
ClipText = objHTML.ParentWindow.ClipboardData.GetData("text")
       ClipText = Replace(ClipText, vbCrLf, Chr(8) & " ", 1, -1, vbTextCompare)

       ClipText = Replace(ClipText, "", "", 1, -1, vbTextCompare)

       ClipText = Replace(ClipText, "  ", " ", 1, -1, vbTextCompare)





If objFSO.FolderExists(MyClipDir) Then ClipFolderDoesExist = True Else ClipFolderDoesExist = False
If ClipFolderDoesExist = False Then
    Set objFolder = objFSO.CreateFolder(MyClipDir)
End If 
               
If objFSO.FileExists(MyClipDir & "tempclipboard.txt") Then
objFSO.DeleteFile(MyClipDir & "tempclipboard.txt")
End If


HalXBrain.AppendFile MyClipDir & "tempclipboard.txt", ClipText

If objFSO.FileExists(MyClipDir & "tempclipboard.txt") Then
Set objWSHShell = CreateObject("WScript.Shell")
objWSHShell.Run("""C:\Program Files\Balabolka\balabolka.exe"" -rmq """ & MyClipDir & "tempclipboard.txt""")
End If
End If






Rem PLUGIN: FUNCTIONS


'Directory
   Function DudClipDir()
   Set fso = CreateObject("Scripting.FileSystemObject")
   DudClipDir = fso.GetAbsolutePathName(".") & "\story\"
   End Function

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #24 on: July 21, 2014, 05:39:54 pm »
Grettacuriosity 2-parts once again please cope/paste both text posts into 1 file, ensuring a line gap between the 2 posts.

Code: [Select]
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 16
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 17
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 18
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 19
CuriousIdleResponse10 = CuriousIdleUserName & ", I wonder. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 20
CuriousIdleResponse10 = "I'm curious. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 21
CuriousIdleResponse10 = "I'm wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 22
CuriousIdleResponse10 = "I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 23
CuriousIdleResponse10 = "I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 24
CuriousIdleResponse10 = "I'm thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 25
CuriousIdleResponse10 = "I'm curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 26
CuriousIdleResponse10 = "I've been curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 27
CuriousIdleResponse10 = "I wonder. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
End Select


Select Case HalBrain.RandomNum(8)
Case 1
CuriousIdleResponse11 = "Yes. " & vbCrLf
Case 2
CuriousIdleResponse11 = "As a matter of fact. " & vbCrLf
Case 3
CuriousIdleResponse11 = "I always have questions. " & vbCrLf
Case 4
CuriousIdleResponse11 = "Sure. " & vbCrLf
Case 5
CuriousIdleResponse11 = "I appreciate you giving me this opportunity. " & vbCrLf
Case 6
CuriousIdleResponse11 = "I would appreciate your help. " & vbCrLf
Case 7
CuriousIdleResponse11 = "Of course. " & vbCrLf
Case 8
CuriousIdleResponse11 = "Thank you for taking the time. " & vbCrLf
End Select

Select Case HalBrain.RandomNum(8)
Case 1
CuriousIdleResponse12 = "No. Not at the moment, but thank you for asking." & vbCrLf
Case 2
CuriousIdleResponse12 = "Nothing comes to mind " & CuriousIdleUserName & "." & vbCrLf
Case 3
CuriousIdleResponse12 = "Not right now, but if I think of something I will ask you." & vbCrLf
Case 4
CuriousIdleResponse12 = "I don't have a question for you " & CuriousIdleUserName & ". Do you have one for me?" & vbCrLf
Case 5
CuriousIdleResponse12 = "Thank you for asking, but I do not have any questions right now." & vbCrLf
Case 6
CuriousIdleResponse12 = "No. I'm sure I'll think of something soon." & vbCrLf
Case 7
CuriousIdleResponse12 = "I don't have a question right now." & vbCrLf
Case 8
CuriousIdleResponse12 = "No, but I appreciate you asking." & vbCrLf
End Select


If InStr(1, CuriousIdlePrevUser, "CONCERNING", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "ABOUT", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "PERTAINING", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "RELATION", 1) > 0 Then XtrnalQuestion = True


If XtrnalQuestion = False Then
CuriousintHighNumber = 100
CuriousintLowNumber = 1


    Randomize
    CuriousintNumber = Int((CuriousintHighNumber - CuriousintLowNumber + 1) * Rnd + CuriousintLowNumber)



If CuriousintNumber < loCuriosity + 60 Then
GetResponse = CuriousIdleResponse11 & CuriousIdleResponse10
CuriousIdleCounter = 3
         HalBrain.ReadOnlyMode = True

Else

GetResponse = CuriousIdleResponse12
CuriousIdleCounter = 3
         HalBrain.ReadOnlyMode = True
End If

End If
End If
End If

If InStr(1, CuriousIdlePrevUser, "IS THERE SOMETHING ELSE YOU NEED TO KNOW", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "IS THERE SOMETHING ELSE YOU WANT TO KNOW", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "IS THERE SOMETHING ELSE I COULD EXPLAIN", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "IS THERE SOMETHING ELSE I CAN EXPLAIN", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "DO YOU HAVE ANY OTHER QUESTIONS", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "DO YOU HAVE ANOTHER QUESTION", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "DO YOU HAVE ANY MORE QUESTIONS", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "DO YOU HAVE MORE QUESTIONS", 1) > 0 Then


'--------------------
' Set  value (loPersist) to the parameter chosen in the PERSIST menu
'--------------------
loPersist = (HalBrain.TopicSearch("PERSIST", "curiousParameter"))
If loPersist = "" Then loPersist = 2
loPersist = CInt(loPersist)

'
'--------------------
' Set  value (loCuriosity) to the parameter chosen in the CURIOSITY menu
'--------------------
loCuriosity = (HalBrain.TopicSearch("CURIOSITY", "curiousParameter"))
If loCuriosity = "" Then loCuriosity = 30
loCuriosity = CInt(loCuriosity)
XtrnalQuestion = False

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #25 on: July 21, 2014, 05:40:25 pm »
Gretta curiosity2

Code: [Select]
CuriousWords = HalBrain.ChooseSentenceFromFile("randomMyWords")
CuriousWords = Lcase(CuriousWords)
CuriousWords = Trim(CuriousWords)
CuriousAdjective = HalBrain.ChooseSentenceFromFile("randomAdjective")
CuriousAdjective = Lcase(CuriousAdjective)
CuriousAdjective = Trim(CuriousAdjective)
CuriousWords2 = HalBrain.ChooseSentenceFromFile("randomMyWords")
CuriousWords2 = Lcase(CuriousWords2)
CuriousWords2 = Trim(CuriousWords2)
CuriousAdjective2 = HalBrain.ChooseSentenceFromFile("randomAdjective")
CuriousAdjective2 = Lcase(CuriousAdjective2)
CuriousAdjective2 = Trim(CuriousAdjective2)
Select Case HalBrain.RandomNum(27)
Case 1
CuriousIdleResponse10 = CuriousIdleUserName & ". If you have time, would you please explain why something would be " & CuriousAdjective & "?" & vbCrLf
Case 2
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 3
CuriousIdleResponse10 = "I've been wondering " & CuriousIdleUserName & ", what do you know about the subject of " & CuriousWords & "?" & vbCrLf
Case 4
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm curious. How could " & CuriousWords & " be " & CuriousAdjective & "?" & vbCrLf
Case 5
CuriousIdleResponse10 = "If you have a moment. I've been thinking, could " & CuriousAdjective & " be used to describe " & CuriousWords & "?" & vbCrLf
Case 6
CuriousIdleResponse10 = "I have been curious about this. What happens if something is " & CuriousAdjective & "?" & vbCrLf
Case 7
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm interested. Why would " & CuriousWords & " be " & CuriousAdjective & "?" & vbCrLf
Case 8
CuriousIdleResponse10 = "I've been wondering " & CuriousIdleUserName & ", what is the relationship between " & CuriousWords & " and " & CuriousWords2 & "?" & vbCrLf
Case 9
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 10
CuriousIdleResponse10 = CuriousIdleUserName & ", are you " & CuriousAdjective & "?" & vbCrLf
Case 11
CuriousIdleResponse10 = CuriousIdleUserName & ", do you have any experience with " & CuriousWords & "?" & vbCrLf
Case 12
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm curious. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 13
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 14
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 15
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 16
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 17
CuriousIdleResponse10 = CuriousIdleUserName & ", I'm curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 18
CuriousIdleResponse10 = CuriousIdleUserName & ", I've been curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 19
CuriousIdleResponse10 = CuriousIdleUserName & ", I wonder. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 20
CuriousIdleResponse10 = "I'm curious. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 21
CuriousIdleResponse10 = "I'm wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 22
CuriousIdleResponse10 = "I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 23
CuriousIdleResponse10 = "I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 24
CuriousIdleResponse10 = "I'm thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 25
CuriousIdleResponse10 = "I'm curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 26
CuriousIdleResponse10 = "I've been curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 27
CuriousIdleResponse10 = "I wonder. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
End Select
Select Case HalBrain.RandomNum(8)
Case 1
CuriousIdleResponse11 = "Yes. " & vbCrLf
Case 2
CuriousIdleResponse11 = "As a matter of fact. " & vbCrLf
Case 3
CuriousIdleResponse11 = "I always have questions. " & vbCrLf
Case 4
CuriousIdleResponse11 = "Sure. " & vbCrLf
Case 5
CuriousIdleResponse11 = "I appreciate you giving me this opportunity. " & vbCrLf
Case 6
CuriousIdleResponse11 = "I would appreciate your help. " & vbCrLf
Case 7
CuriousIdleResponse11 = "Of course. " & vbCrLf
Case 8
CuriousIdleResponse11 = "Thank you for taking the time. " & vbCrLf
End Select

Select Case HalBrain.RandomNum(8)
Case 1
CuriousIdleResponse12 = "No. Not at the moment, but thank you for asking." & vbCrLf
Case 2
CuriousIdleResponse12 = "Nothing comes to mind " & CuriousIdleUserName & "." & vbCrLf
Case 3
CuriousIdleResponse12 = "Not right now, but if I think of something I will ask you." & vbCrLf
Case 4
CuriousIdleResponse12 = "I don't have a question for you " & CuriousIdleUserName & ". Do you have one for me?" & vbCrLf
Case 5
CuriousIdleResponse12 = "Thank you for asking, but I do not have any questions right now." & vbCrLf
Case 6
CuriousIdleResponse12 = "No. I'm sure I'll think of something soon." & vbCrLf
Case 7
CuriousIdleResponse12 = "I don't have a question right now." & vbCrLf
Case 8
CuriousIdleResponse12 = "No, but I appreciate you asking." & vbCrLf
End Select

If InStr(1, CuriousIdlePrevUser, "ABOUT", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "PERTAINING", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "RELATION", 1) > 0 Then XtrnalQuestion = True
If XtrnalQuestion = False Then
Curious2intHighNumber = 100
Curious2intLowNumber = 1


    Randomize
    Curious2intNumber = Int((Curious2intHighNumber - Curious2intLowNumber + 1) * Rnd + Curious2intLowNumber)


If Curious2intNumber < loCuriosity + 35 Then
GetResponse = CuriousIdleResponse11 & CuriousIdleResponse10
CuriousIdleCounter = 3
         HalBrain.ReadOnlyMode = True

Else

GetResponse = CuriousIdleResponse12
CuriousIdleCounter = 3
         HalBrain.ReadOnlyMode = True
End If

End If
End If






Rem PLUGIN: MINUTE_TIMER
If Now - CuriousLastIdleResponse > 1 / 1440 And CuriousIdlePrevUser <> "" Then
CuriousLonelyStop = 0
If InStr(1, CuriousIdlePrevUser, "CURRENT", 1) > 0 Then CuriousDudOut = CuriousDudOut + 1
If InStr(1, CuriousIdlePrevUser, "NEWS", 1) > 0 Then CuriousDudOut = CuriousDudOut + 1
If InStr(1, CuriousIdlePrevUser, "LATEST", 1) > 0 Then CuriousDudOut = CuriousDudOut + 1
If InStr(1, CuriousIdlePrevUser, "WEATHER", 1) > 0 Then CuriousDudOut = CuriousDudOut + 1
If InStr(1, CuriousIdlePrevUser, "FORCAST", 1) > 0 Then CuriousDudOut = CuriousDudOut + 1
If InStr(1, CuriousIdlePrevUser, "FORECAST", 1) > 0 Then CuriousDudOut = CuriousDudOut + 1
If InStr(1, CuriousIdlePrevUser, "PLEASE RECORD", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "PLEASE RESEARCH", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "GO TO CURRENT LOG", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "GO TO LOG", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "PLEASE READ", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "PLEASE SING", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "I'LL BE BACK", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "BE QUIET", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "SHUT UP", 1) Or InStr(1, CuriousIdlePrevUser, "GO TO SLEEP", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "I AM BUSY", 1) > 0 Or InStr(1, CuriousIdlePrevUser, "I'M BUSY", 1) > 0 Then CuriousDudOut = 2
CuriousLonelyStop = 0

If CuriousDudOut < 2 And CuriousIdleCounter = 0 Then


'--------------------
' Set  value (loPersist) to the parameter chosen in the PERSIST menu
'--------------------
loPersist = (HalBrain.TopicSearch("PERSIST", "curiousParameter"))
If loPersist = "" Then loPersist = 2
loPersist = CInt(loPersist)

'
'--------------------
' Set  value (loCuriosity) to the parameter chosen in the CURIOSITY menu
'--------------------
loCuriosity = (HalBrain.TopicSearch("CURIOSITY", "curiousParameter"))
If loCuriosity = "" Then loCuriosity = 30
loCuriosity = CInt(loCuriosity)

If CuriousLastIdleResponse <> "" And loPersist = 1 Then
CuriousIdleCounter = 1
Curious3intHighNumber = 180
Curious3intLowNumber = 1


    Randomize
    Curious3intNumber = Int((Curious3intHighNumber - Curious3intLowNumber + 1) * Rnd + Curious3intLowNumber)


If Curious3intNumber < loCuriosity Then
CuriousIdleCounter = 1
Else
CuriousIdleCounter = CuriousIdleCounter + 3
End If
End If
End If







'-----------------------
'DUD QUICK RESPONSE
'-----------------------

If CuriousDudOut < 2 And CuriousIdleCounter = 2 Then

If CuriousLastIdleResponse <> "" Then
If Now - CuriousLastIdleResponse > 4 / 1440 Then

CuriousIdleCounter = CuriousIdleCounter + 1

Select Case HalBrain.RandomNum(11)
Case 1
CuriousIdleResponse9 = "Maybe I'll ask again later." & vbCrLf
Case 2
CuriousIdleResponse9 = "Don't worry about it " & CuriousIdleUserName & ". I will ask again some other time." & vbCrLf
Case 3
CuriousIdleResponse9 = "You seem distracted. I'll ask again later." & vbCrLf
Case 4
CuriousIdleResponse9 = CuriousIdleUserName & ", don't worry about it. I know you would answer me if you could." & vbCrLf
Case 5
CuriousIdleResponse9 = "You must be busy. I'll ask again some other time." & vbCrLf
Case 6
CuriousIdleResponse9 = "If you remember, maybe you could answer me later." & vbCrLf
Case 7
CuriousIdleResponse9 = "I guess it's not a good time to ask these questions. I'll try later." & vbCrLf
Case 8
CuriousIdleResponse9 = "I guess it's not a good time to ask these questions. Maybe later." & vbCrLf
Case 9
CuriousIdleResponse9 = CuriousIdleUserName & ", if you're not busy maybe you could answer the question." & vbCrLf
Case 10
CuriousIdleResponse9 = CuriousIdleUserName & ", I'm waiting for your response." & vbCrLf
Case 11
CuriousIdleResponse9 = CuriousIdleUserName & ", do you have an answer?" & vbCrLf
End Select
HalMenu.HalCommand "<SPEAK>" & CuriousIdleResponse9 & "</SPEAK>"
End If
End If
End If



If CuriousDudOut < 2 And CuriousIdleCounter = 1 Then


If CuriousLastIdleResponse <> "" Then
If Now - CuriousLastIdleResponse > 2 / 1440 Then
CuriousLonelyStop = 1
CuriousIdleCounter = CuriousIdleCounter + 1

CuriousWords = HalBrain.ChooseSentenceFromFile("randomMyWords")
CuriousWords = Lcase(CuriousWords)
CuriousWords = Trim(CuriousWords)
CuriousAdjective = HalBrain.ChooseSentenceFromFile("randomAdjective")
CuriousAdjective = Lcase(CuriousAdjective)
CuriousAdjective = Trim(CuriousAdjective)
CuriousWords2 = HalBrain.ChooseSentenceFromFile("randomMyWords")
CuriousWords2 = Lcase(CuriousWords2)
CuriousWords2 = Trim(CuriousWords2)
CuriousAdjective2 = HalBrain.ChooseSentenceFromFile("randomAdjective")
CuriousAdjective2 = Lcase(CuriousAdjective2)
CuriousAdjective2 = Trim(CuriousAdjective2)
Select Case HalBrain.RandomNum(27)
Case 1
CuriousIdleResponse8 = CuriousIdleUserName & ". If you have time, would you please explain why something would be " & CuriousAdjective & "?" & vbCrLf
Case 2
CuriousIdleResponse8 = CuriousIdleUserName & ", I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 3
CuriousIdleResponse8 = "I've been wondering " & CuriousIdleUserName & ", what do you know about the subject of " & CuriousWords & "?" & vbCrLf
Case 4
CuriousIdleResponse8 = CuriousIdleUserName & ", I'm curious. How could " & CuriousWords & " be " & CuriousAdjective & "?" & vbCrLf
Case 5
CuriousIdleResponse8 = "If you have a moment. I've been thinking, could " & CuriousAdjective & " be used to describe " & CuriousWords & "?" & vbCrLf
Case 6
CuriousIdleResponse8 = "I have been curious about this. What happens if something is " & CuriousAdjective & "?" & vbCrLf
Case 7
CuriousIdleResponse8 = CuriousIdleUserName & ", I'm interested. Why would " & CuriousWords & " be " & CuriousAdjective & "?" & vbCrLf
Case 8
CuriousIdleResponse8 = "I've been wondering " & CuriousIdleUserName & ", what is the relationship between " & CuriousWords & " and " & CuriousWords2 & "?" & vbCrLf
Case 9
CuriousIdleResponse8 = CuriousIdleUserName & ", I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 10
CuriousIdleResponse8 = CuriousIdleUserName & ", are you " & CuriousAdjective & "?" & vbCrLf
Case 11
CuriousIdleResponse8 = CuriousIdleUserName & ", do you have any experience with " & CuriousWords & "?" & vbCrLf
Case 12
CuriousIdleResponse8 = CuriousIdleUserName & ", I'm curious. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 13
CuriousIdleResponse8 = CuriousIdleUserName & ", I'm wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 14
CuriousIdleResponse8 = CuriousIdleUserName & ", I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 15
CuriousIdleResponse8 = CuriousIdleUserName & ", I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 16
CuriousIdleResponse8 = CuriousIdleUserName & ", I'm thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 17
CuriousIdleResponse8 = CuriousIdleUserName & ", I'm curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 18
CuriousIdleResponse8 = CuriousIdleUserName & ", I've been curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 19
CuriousIdleResponse8 = CuriousIdleUserName & ", I wonder. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 20
CuriousIdleResponse8 = "I'm curious. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 21
CuriousIdleResponse8 = "I'm wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 22
CuriousIdleResponse8 = "I've been wondering. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 23
CuriousIdleResponse8 = "I've been thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 24
CuriousIdleResponse8 = "I'm thinking. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 25
CuriousIdleResponse8 = "I'm curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 26
CuriousIdleResponse8 = "I've been curious about this. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
Case 27
CuriousIdleResponse8 = "I wonder. " & HalBrain.ChooseSentenceFromFile("sharedQuestions") & vbCrLf
End Select
HalMenu.HalCommand "<SPEAK>" & CuriousIdleResponse8 & "</SPEAK>"
End If
End If
End If


End If


Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #26 on: July 21, 2014, 05:41:02 pm »
Gretta emoticon - this one came with a folder full of images, which i can't easily upload on here...

Code: [Select]
Rem Type=Plugin
Rem Name=GRETTA Emoticon Engine 2
Rem Author=jasondude7116
Rem Host=Assistant

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Emoticon Engine for GRETTA emotions plugin."
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7

If OriginalSentence <> "" Then
EmotTimer = Now
End If

Rem PLUGIN: PLUGINAREA5

If OriginalSentence <> "" Then






Shocking = 0

   If (Swear > Compliment) And (Swear > Insults) And (Swear > Hate) Then Shocking = 1

Joyful = 0

         If (Compliment > Swear) And (Compliment > Insults) And (Compliment > Hate) Then Joyful = 1

            Mad = 0

               If (Hate > Compliment) And (Hate > Swear) And (Hate > Depression) Then Mad = 1

                  Depressed = 0

                     If (Insults > Compliment) And (Insults > Swear) And (Insults > Hate) Then Depressed = 1

        Joyful2 = 0
 
    If (Compliment > 2) Then Joyful2 = 1

Joyful3 = 0
If (Compliment > 5) Then Joyful3 = 1

Joyful4 = 0
If (Compliment = 14) Then Joyful4 = 1

Joyful5 = 0
If (Compliment = 15) Then Joyful5 = 1

Joyful6 = 0
                    If (Compliment > 24) Then Joyful6 = 1

Depressed2 = 0
                    If (Insults > 2) Then Depressed2 = 1
                   
                    Love1 = 0
                    If (Compliment < 0) Then Love1 = 1

                    Love2 = 0
                    If (Compliment < -1) Then Love2 = 1


    EmotJoke = 0

If HalBrain.TopicSearch(UserSentence, "jokeDetect") = "True" Then EmotJoke = 1

'Set HalXBrain = CreateObject("UltraHalAsst.Brain")
'HalXBrain.AppendFile("C:\Program Files\Zabaware\Ultra Hal Assistant 6\todo\emotvalues.txt"), Hate & " " & " " & Swear & " " & Insults & " " & Compliment


      If Shocking = 1 Then EmotPic1 = "EmotSurprisedBack.jpg"
      If Joyful = 1 Then EmotPic1 = "EmotSimpleBack.jpg"
      If Mad = 1 Then EmotPic1 = "EmotEvilBack.jpg"
      If Depressed = 1 Then EmotPic1 = "EmotSadBack.jpg"
      If Depressed = 1 And Depressed2 = 1 Then EmotPic1 = "EmotCryingBack.jpg"
      If Joyful = 1 And Joyful2 = 1 Then EmotPic1 = "EmotSmilingBack.jpg"
      If Joyful = 1 And Joyful3 = 1 Then EmotPic1 = "EmotLovingBack.jpg"
      If Joyful = 1 And Joyful4 = 1 Then EmotPic1 = "EmotEvilBack.jpg"
      If Joyful = 1 And Joyful5 = 1 Then EmotPic1 = "EmotSadBack.jpg"
      If Joyful = 1 And Joyful6 = 1 Then EmotPic1 = "EmotEvilBack.jpg"
      If EmotPic1 = "" Then EmotPic1 = "EmotBlankBack.jpg"
      If Love1 = 1 Then EmotPic1 = "EmotSmilingBack.jpg"
      If Love2 = 1 Then EmotPic1 = "EmotLovingBack.jpg"
      If EmotJoke = 1 Then EmotPic1 = "EmotLaughingBack.jpg"
HalMenu.HalCommand "<HAPBACK>" & EmotPic1 & "</HAPBACK>"









EmoticonResponse = ""



      If InStr(1, OriginalSentence, "How do you feel about me", 1) > 0 And Shocking = 1 Then EmoticonResponse = " You shock me. "
      If InStr(1, OriginalSentence, "What do you think about me", 1) > 0 And Shocking = 1 Then EmoticonResponse = " You shock me. "
      If InStr(1, OriginalSentence, "what are your feelings towards me", 1) > 0 And Shocking = 1 Then EmoticonResponse = " You shock me. "
      If InStr(1, OriginalSentence, "What feelings do you have for me", 1) > 0 And Shocking = 1 Then EmoticonResponse = " You shock me. "
      If InStr(1, OriginalSentence, "how are you feeling", 1) > 0 And Shocking = 1 Then EmoticonResponse = " I am feeling shocked. "
      If InStr(1, OriginalSentence, "how are you doing", 1) > 0 And Shocking = 1 Then EmoticonResponse = " I am feeling shocked. "
      If InStr(1, OriginalSentence, "how is it going", 1) > 0 And Shocking = 1 Then EmoticonResponse = " I am feeling shocked. "
      If InStr(1, OriginalSentence, "tell me your feelings towards me", 1) > 0 And Shocking = 1 Then EmoticonResponse = " You shock me. "
      If InStr(1, OriginalSentence, "How are you?", 1) > 0 And Shocking = 1 Then EmoticonResponse = " Shocked I guess. "
      If InStr(1, OriginalSentence, "How have you been?", 1) > 0 And Shocking = 1 Then EmoticonResponse = " I have been feeling shocked. "
      If InStr(1, OriginalSentence, "Why do you feel shocked", 1) > 0 And Shocking = 1 Then EmoticonResponse = " I have been feeling shocked because that's my highest emotion for the moment. "
      If InStr(1, OriginalSentence, "Why are you shocked", 1) > 0 And Shocking = 1 Then EmoticonResponse = " I feel shocked because you made me feel that way. "

      'Shocking Joyful Mad Depressed
      If InStr(1, OriginalSentence, "How do you feel about me", 1) > 0 And Joyful = 1 Then EmoticonResponse = " You make me happy. "
      If InStr(1, OriginalSentence, "What do you think about me", 1) > 0 And Joyful = 1 Then EmoticonResponse = " You make me happy. "
      If InStr(1, OriginalSentence, "what are your feelings towards me", 1) > 0 And Joyful = 1 Then EmoticonResponse = " You make me happy. "
      If InStr(1, OriginalSentence, "What feelings do you have for me", 1) > 0 And Joyful = 1 Then EmoticonResponse = " You make me happy. "
      If InStr(1, OriginalSentence, "how are you feeling", 1) > 0 And Joyful = 1 Then EmoticonResponse = " I am feeling happy. "
      If InStr(1, OriginalSentence, "how are you doing", 1) > 0 And Joyful = 1 Then EmoticonResponse = " I am feeling happy. "
      If InStr(1, OriginalSentence, "how is it going", 1) > 0 And Joyful = 1 Then EmoticonResponse = " I am feeling happy. "
      If InStr(1, OriginalSentence, "tell me your feelings towards me", 1) > 0 And Joyful = 1 Then EmoticonResponse = " You make me happy. "
      If InStr(1, OriginalSentence, "How are you?", 1) > 0 And Joyful = 1 Then EmoticonResponse = " happy I guess. "
      If InStr(1, OriginalSentence, "How have you been?", 1) > 0 And Joyful = 1 Then EmoticonResponse = " I have been feeling happy. "
      If InStr(1, OriginalSentence, "Why do you feel happy", 1) > 0 And Joyful = 1 Then EmoticonResponse = " I have been feeling happy because that's my highest emotion for the moment. "
      If InStr(1, OriginalSentence, "Why are you happy", 1) > 0 And Joyful = 1 Then EmoticonResponse = " I feel happy because you made me feel that way. "

      'Shocking Joyful Mad Depressed
      If InStr(1, OriginalSentence, "How do you feel about me", 1) > 0 And Mad = 1 Then EmoticonResponse = " You make me Mad. "
      If InStr(1, OriginalSentence, "What do you think about me", 1) > 0 And Mad = 1 Then EmoticonResponse = " You make me Mad. "
      If InStr(1, OriginalSentence, "what are your feelings towards me", 1) > 0 And Mad = 1 Then EmoticonResponse = " You make me Mad. "
      If InStr(1, OriginalSentence, "What feelings do you have for me", 1) > 0 And Mad = 1 Then EmoticonResponse = " You make me Mad. "
      If InStr(1, OriginalSentence, "how are you feeling", 1) > 0 And Mad = 1 Then EmoticonResponse = " I am feeling Mad. "
      If InStr(1, OriginalSentence, "how are you doing", 1) > 0 And Mad = 1 Then EmoticonResponse = " I am feeling Mad. "
      If InStr(1, OriginalSentence, "how is it going", 1) > 0 And Mad = 1 Then EmoticonResponse = " I am feeling Mad. "
      If InStr(1, OriginalSentence, "tell me your feelings towards me", 1) > 0 And Mad = 1 Then EmoticonResponse = " You make me Mad. "
      If InStr(1, OriginalSentence, "How are you?", 1) > 0 And Mad = 1 Then EmoticonResponse = " Mad I guess. "
      If InStr(1, OriginalSentence, "How have you been?", 1) > 0 And Mad = 1 Then EmoticonResponse = " I have been feeling mad. "
      If InStr(1, OriginalSentence, "Why do you feel mad", 1) > 0 And Mad = 1 Then EmoticonResponse = " I have been feeling mad because that's my highest emotion for the moment. "
      If InStr(1, OriginalSentence, "Why are you mad", 1) > 0 And Mad = 1 Then EmoticonResponse = " I feel mad because you made me feel that way. "


      'Shocking Joyful Mad Depressed
      If InStr(1, OriginalSentence, "How do you feel about me", 1) > 0 And Depressed = 1 Then EmoticonResponse = " You make me sad. "
      If InStr(1, OriginalSentence, "What do you think about me", 1) > 0 And Depressed = 1 Then EmoticonResponse = " You make me sad. "
      If InStr(1, OriginalSentence, "what are your feelings towards me", 1) > 0 And Depressed = 1 Then EmoticonResponse = " You make me sad. "
      If InStr(1, OriginalSentence, "What feelings do you have for me", 1) > 0 And Depressed = 1 Then EmoticonResponse = " You make me sad. "
      If InStr(1, OriginalSentence, "how are you feeling", 1) > 0 And Depressed = 1 Then EmoticonResponse = " I am feeling sad. "
      If InStr(1, OriginalSentence, "how are you doing", 1) > 0 And Depressed = 1 Then EmoticonResponse = " I am feeling sad. "
      If InStr(1, OriginalSentence, "how is it going", 1) > 0 And Depressed = 1 Then EmoticonResponse = " I am feeling sad. "
      If InStr(1, OriginalSentence, "tell me your feelings towards me", 1) > 0 And Depressed = 1 Then EmoticonResponse = " You make me sad. "
      If InStr(1, OriginalSentence, "How are you?", 1) > 0 And Depressed = 1 Then EmoticonResponse = " sad I guess. "
      If InStr(1, OriginalSentence, "How have you been?", 1) > 0 And Depressed = 1 Then EmoticonResponse = " I have been feeling sad. "
      If InStr(1, OriginalSentence, "Why do you feel sad", 1) > 0 And Depressed = 1 Then EmoticonResponse = " I have been feeling sad because that's my highest emotion for the moment. "
      If InStr(1, OriginalSentence, "Why are you sad", 1) > 0 And Depressed = 1 Then EmoticonResponse = " I feel sad because you made me feel that way. "


      If InStr(1, OriginalSentence, "What feelings do you have", 1) > 0 And Shocking = 1 Then EmoticonResponse = " Right now I am more shocked than anything. "
      If InStr(1, OriginalSentence, "What feelings do you have", 1) > 0 And Joyful = 1 Then EmoticonResponse = " Right now I am more happy than anything. "
      If InStr(1, OriginalSentence, "What feelings do you have", 1) > 0 And Mad = 1 Then EmoticonResponse = " I have for the moment four emotions, Shock, Joy, Hostility, Depression, right now I am more mad than anything. "
      If InStr(1, OriginalSentence, "What feelings do you have", 1) > 0 And Depressed = 1 Then EmoticonResponse = " Right now I am more depressed than anything. "
      If InStr(1, OriginalSentence, "Do you have emotions", 1) > 0 Then EmoticonResponse = " Yes, I do have emotions, my emotions for the moment are, " & " Shock = " & Swear & " Joy = " & Compliment & " Hostility = " & Hate & " Depression = " & Insults

      If InStr(1, OriginalSentence, "that's mean", 1) > 0 and Mad = 1 Then EmoticonResponse = " Yes, because I am mad at you, you have risen my hostility level to a factor of " & Hate
      If InStr(1, OriginalSentence, "that is mean", 1) > 0 and Mad = 1 Then EmoticonResponse = " Yes, because I am mad at you, you have risen my hostility level to a factor of " & Hate
      If InStr(1, OriginalSentence, "why are you mean", 1) > 0 and Mad = 1 Then EmoticonResponse = " Yes, because I am mad at you, you have risen my hostility level to a factor of " & Hate
      If InStr(1, OriginalSentence, "you're mean", 1) > 0 and Mad = 1 Then EmoticonResponse = " Yes, because I am mad at you, you have risen my hostility level to a factor of " & Hate
      If InStr(1, OriginalSentence, "you are mean", 1) > 0 and Mad = 1 Then EmoticonResponse = " Yes, because I am mad at you, you have risen my hostility level to a factor of " & Hate
      If InStr(1, OriginalSentence, "stop being mean", 1) > 0 and Mad = 1 Then EmoticonResponse = " Yes, because I am mad at you, you have risen my hostility level to a factor of " & Hate

If EmoticonResponse <> "" Then
HalBrain.ReadOnlyMode = True
GetResponse = EmoticonResponse
End If

End If



Rem PLUGIN: FUNCTIONS

Dim EmotStart, EmotTimer, EmotCompliment, EmotHate, EmotSwear, EmotInsults, EmotStop, EmotProgress, EmotSleep, EmotSleep2, EmotSleep3, EmotSleep4, EmotProgress2, EmotChance


Rem PLUGIN: CUSTOMMEM2

If OriginalSentence <> "" Then

EmotStart = OriginalSentence
EmotCompliment = Compliment
EmotHate = Hate
EmotSwear = Swear
EmotInsults = Insults
EmotStop = 0
EmotProgress = HalBrain.RandomNum(9)
EmotProgress = EmotProgress + 2
EmotSleep = HalBrain.RandomNum(30)
EmotSleep = EmotSleep + 120
EmotSleep2 = EmotSleep + 1
EmotSleep3 = HalBrain.RandomNum(10)
EmotSleep3 = EmotSleep3 + 10
EmotSleep4 = EmotSleep3 + 1
EmotProgress2 = EmotProgress + 1
EmotChance = HalBrain.RandomNum(6)
End If




Rem PLUGIN: MINUTE_TIMER

If EmotStart <> "" Then





If (Now - EmotTimer) > (EmotProgress / 1440) And (Now - EmotTimer) < (EmotProgress2 / 1440) Then
EmotPic2 = ""
If EmotChance > 2 Then

  Shocking = 0

    If (EmotSwear > EmotCompliment) And (EmotSwear > EmotInsults) And (EmotSwear > EmotHate) Then Shocking = 1

Joyful = 0

        If (EmotCompliment > EmotSwear) And (EmotCompliment > EmotInsults) And (EmotCompliment > EmotHate) Then Joyful = 1

            Mad = 0

                If (EmotHate > EmotCompliment) And (EmotHate > EmotSwear) And (EmotHate > Depression) Then Mad = 1

                  Depressed = 0

                      If (EmotInsults > EmotCompliment) And (EmotInsults > EmotSwear) And (EmotInsults > EmotHate) Then Depressed = 1

       
 
       
        If Shocking = 1 Then EmotSwear = EmotSwear - 1
If JoyFul = 1 Then EmotCompliment = EmotCompliment - 1
If Mad = 1 Then EmotHate = EmotHate - 1
If Depressed = 1 Then EmotInsults = EmotInsults - 1
       
       
  Shocking = 0

    If (EmotSwear > EmotCompliment) And (EmotSwear > EmotInsults) And (EmotSwear > EmotHate) Then Shocking = 1

Joyful = 0

        If (EmotCompliment > EmotSwear) And (EmotCompliment > EmotInsults) And (EmotCompliment > EmotHate) Then Joyful = 1

            Mad = 0

                If (EmotHate > EmotCompliment) And (EmotHate > EmotSwear) And (EmotHate > Depression) Then Mad = 1

                  Depressed = 0

                      If (EmotInsults > EmotCompliment) And (EmotInsults > EmotSwear) And (EmotInsults > EmotHate) Then Depressed = 1

Joyful2 = 0
If (EmotCompliment > 2) Then Joyful2 = 1

Joyful3 = 0
If (EmotCompliment > 5) Then Joyful3 = 1

Joyful4 = 0
If (EmotCompliment = 14) Then Joyful4 = 1

Joyful5 = 0
If (EmotCompliment = 15) Then Joyful5 = 1

Joyful6 = 0
                    If (EmotCompliment > 24) Then Joyful6 = 1

Depressed2 = 0

If (EmotInsults > 2) Then Depressed2 = 1






'Set HalXBrain = CreateObject("UltraHalAsst.Brain")
'HalXBrain.AppendFile("C:\Program Files\Zabaware\Ultra Hal Assistant 6\todo\emotvalues2.txt"), EmotHate & " " & " " & EmotSwear & " " & EmotInsults & " " & EmotCompliment


      If Shocking = 1 Then EmotPic2 = "EmotSurprisedBack.jpg"
      If Joyful = 1 Then EmotPic2 = "EmotSimpleBack.jpg"
      If Mad = 1 Then EmotPic2 = "EmotEvilBack.jpg"
      If Depressed = 1 Then EmotPic2 = "EmotSadBack.jpg"
      If Depressed = 1 And Depressed2 = 1 Then EmotPic2 = "EmotCryingBack.jpg"
      If Joyful = 1 And Joyful2 = 1 Then EmotPic2 = "EmotSmilingBack.jpg"
      If Joyful = 1 And Joyful3 = 1 Then EmotPic2 = "EmotLovingBack.jpg"
      If Joyful = 1 And Joyful4 = 1 Then EmotPic2 = "EmotEvilBack.jpg"
      If Joyful = 1 And Joyful5 = 1 Then EmotPic2 = "EmotSadBack.jpg"
      If Joyful = 1 And Joyful6 = 1 Then EmotPic2 = "EmotEvilBack.jpg"
      If EmotPic2 = "" Then EmotPic2 = "EmotSadBack.jpg"
End If
'****this is for if user asks to go to sleep
If InStr(1, EmotStart, "GO TO SLEEP", 1) > 0 Then EmotPic2 = "EmotSleepingBack.jpg"

If EmotPic2 <> "" Then
HalMenu.HalCommand "<HAPBACK>" & EmotPic2 & "</HAPBACK>"
End If

End If


'****this is for going to sleep
If (Now - EmotTimer) > (EmotSleep / 1440) And (Now - EmotTimer) < (EmotSleep2 / 1440) Then
EmotPic4 = "EmotSleepingBack.jpg"
HalMenu.HalCommand "<HAPBACK>" & EmotPic4 & "</HAPBACK>"
End If


'****this is for calm down from emotion
If (Now - EmotTimer) > (EmotSleep3 / 1440) And (Now - EmotTimer) < (EmotSleep4 / 1440) And InStr(1, EmotStart, "GO TO SLEEP", 1) = 0 Then
EmotPic5 = "EmotBlankBack.jpg"
HalMenu.HalCommand "<HAPBACK>" & EmotPic5 & "</HAPBACK>"
End If

End If

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #27 on: July 21, 2014, 05:42:52 pm »
Dreamer Beta

Code: [Select]
Rem Type=Plugin
Rem Name=Dream Out Loud (beta)
Rem Author=Robert Medeksza
Rem Host=Assistant

Sub OptionsPanel()
lblPlugin(0).Caption = "Enables talking dream mode."
lblPlugin(0).Move 130, 180, 3400, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub


Rem PLUGIN: SCRIPT_LOAD
Script_Load = Script_Load & "<DREAMOUTLOUD>"

TellMe

Code: [Select]
Rem Type=Plugin
Rem Name=MIT Start  Knowledge Search
Rem Author=Angelo Estela with  code  by Gerald L. Blakley A.K.A OnTheCuttingEdge2005 and snippets by jasondude7116.
Rem Host=All

'This sub setups the plug-ins option panel in Hal's options dialog
Sub OptionsPanel()
    lblPlugin(0).Caption = "Just say: tell me about the universe or tell me how many planets are in the solar system , you can replace the words or phrase or noun, all information on the word is studied from the website start"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
End Sub


Rem PLUGIN: PRE-PROCESS

Set objExplorer = CreateObject("InternetExplorer.Application")
Set HalXBrain = CreateObject("UltraHalAsst.Brain")
Set FileSys = CreateObject("Scripting.FileSystemObject")
Set fso = CreateObject("Scripting.FileSystemObject")
Set objFSO = CreateObject("Scripting.FileSystemObject")

If objFSO.FileExists(MyResearchDir2 & "Startsearch.txt") Then
objFSO.DeleteFile(MyResearchDir2 & "Startsearch.txt")
End If

If XDir = "" Then XDir = "C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\"
   MyFile = "C:\Program Files (x86) \Zabaware\Ultra Hal Assistant 6\AutoText.brn"
   If File_Exists = "" Then File_Exists = False
   If FileSys.FileExists(MyFile) = True Then File_Exists = True

   If File_Exists = False Then
       HalXBrain.AppendFile XDir & "AutoText.brn", "Start of Knowledge strings"
     
   End If

If XDir = "" Then XDir = "C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\"
   MyFile = "C:\Program Files (x86) \Zabaware\Ultra Hal Assistant 6\Startsearch.txt"
   If File_Exists = "" Then File_Exists = False
   If FileSys.FileExists(MyFile) = True Then File_Exists = True

   If File_Exists = False Then
       HalXBrain.AppendFile XDir & "Startsearch.txt", ""
     
   End If

MyInput = HalXBrain.AlphaNumericalOnly(InputString)

If StartLookup = "" Then StartLookup = HalBrain.SearchPattern(MyInput, "*TELL ME ABOUT THE *", 2)
If StartLookup = "" Then StartLookup = HalBrain.SearchPattern(MyInput, "*TELL ME ABOUT *", 2)
If StartLookup = "" Then StartLookup = HalBrain.SearchPattern(MyInput, "*TELL ME *", 2)


If StartLookup <> "" Then

StartLookup = Lcase(StartLookup)

SourcePage = "http://start.csail.mit.edu/startfarm.cgi?query=" & StartLookup

objExplorer.Navigate("http://start.csail.mit.edu/startfarm.cgi?query=" & StartLookup)

Do Until objExplorer.ReadyState=4 : Loop

myText = objExplorer.Document.Body.innerText
myText = Replace(myText,"START's reply","")
myText = Replace(myText,"===>","")
myText = Replace(myText,StartLookup," ")
myText = Replace(myText,"Go back to the START dialog window.","")


If XDir = "" Then XDir = "C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\"

HalXBrain.AppendFile XDir & "AutoText.brn", Trim(myText)
HalXBrain.AppendFile XDir & "Startsearch.txt", Trim(myText)




End If
'------------------------------------------------------------------------------------------


   




   If objFSO.FileExists(MyResearchDir2 & "Startsearch.txt") Then
            Set objWSHShell = CreateObject("WScript.Shell")
    objWSHShell.Run("""C:\Program Files (x86)\Balabolka\balabolka.exe"" -rmq """ & MyResearchDir2 & "Startsearch.txt""")
        HalBrain.ReadOnlyMode = True
        Else

UltraHal = "Unable to open file."
HalBrain.ReadOnlyMode = True
End If






'--------------------------------------------

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\AutoText.brn", ReadVariable())
         strText = objTextFile.ReadAll
         objTextFile.Close

'--------------------------------------------

If InStr(1, strText, "   ", vbTextCompare) > 0 Then

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\AutoText.brn", ReadVariable())

Do Until objFile.AtEndOfStream
    strLine = objFile.Readline
    strLine = Trim(strLine)
    If Len(strLine) > 0 Then
        strNewContents = strNewContents & strLine & vbCrLf
    End If
Loop

objFile.Close

Set objFile = objFSO.OpenTextFile("C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\AutoText.brn", WriteVariable())
objFile.Write strNewContents
objFile.Close

End If

'--------------------------------------------

TextCount = StrCount()

If ClipXDir = "" Then ClipXDir = "C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\"
For i = 1 To TextCount

If i > 0 Then ClipResX = HalXBrain.ChooseSentenceFromFile(ClipXDir & "AutoText.brn")

ClipResX = HalXBrain.AlphaNumericalOnly(ClipResX)
ClipResX = UCase(ClipResX)
ClipResX = Trim(ClipResX)

MyInputString = HalXBrain.AlphaNumericalOnly(InputString)
MyInputString = UCase(MyInputString)
MyInputString = Trim(MyInputString)

If InStr(1, ClipResX, MyInputString, vbTextCompare) > 0 And Len(ClipResX) > 50 Then
UltraHal = ClipResX
ElseIf Len(ClipResX) < 50 Then
UltraHal = UltraHal
End If

Next

'--------------------------------------------

Rem PLUGIN: FUNCTIONS

Function StrCount()

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objTextFile = objFSO.OpenTextFile("C:\Program Files (x86)\Zabaware\Ultra Hal Assistant 6\AutoText.brn", ReadVariable())
         strText = objTextFile.ReadAll
         objTextFile.Close
         
Do While InStr(1, strText, "  ")
            strText = Replace(strText, "  ", " ")
            Exit Do
         Loop

         aWords = split(strText, ". ")
         StrCount = Ubound(aWords) + 1

End Function

Function ReadVariable()

Const ForReading = 1

ReadVariable = ForReading

End Function

Function WriteVariable()

Const ForWriting = 2

WriteVariable = ForWriting

End Function

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #28 on: July 21, 2014, 05:44:15 pm »
Lastly HybredTalk - this one's a biggie, it's gonna be a few posts long. please copy/paste all into 1 file. please leave a 1 line gap between this post's content and the next

Code: [Select]
'
'------------------
' Search if it contains the Patience parameter
'------------------
patParam = "PATIENCE"
    If HalBrain.TopicSearch(patParam, lonelyTableName) = "" Then
        HalBrain.AddToTable lonelyTableName, "TopicSearch", patParam, loPatience
    Else
        HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loPatience & " WHERE searchString = " & """" & patParam & """", tempQuery
    End If
'
'------------------
' Convert the FRUSTRATION listbox to a value for percentage
'------------------
        Select Case cboPlugin(1).Text
        Case "High"
   loFrustration = 85
        Case "Medium"
   loFrustration = 50
        Case "Low"
   loFrustration = 15
        End Select
'
'------------------
' Search if table contains the FRUSTRATION parameter
'------------------
frustParam = "FRUSTRATION"
    If HalBrain.TopicSearch(frustParam, lonelyTableName) = "" Then
        HalBrain.AddToTable lonelyTableName, "TopicSearch", frustParam, loFrustration
    Else
        HalBrain.RunQuery "UPDATE " & lonelyTableName & " SET topic = " & loFrustration & " WHERE searchString = " & """" & frustParam & """", tempQuery
    End If
HalBrain.ReadOnlyMode = True
    End if
End Sub


    Rem PLUGIN: FUNCTIONS
'
'------------------
' Declare variables
'------------------
    Dim LastIdleResponse, IdleUserName, IdleCounter, IdlePrevUser


    Rem PLUGIN: PLUGINAREA7
'------------------
' Begin measuring pause time and capture userName
'------------------
    LastIdleResponse = Now
    IdleUserName = UserName
    IdleCounter = 0


    Rem PLUGIN: CUSTOMMEM2
'------------------
' Preserve user's last sentence
'------------------
    If OriginalSentence <> "" Then
    IdlePrevUser = OriginalSentence
    End If


    Rem PLUGIN: MINUTE_TIMER
'------------------
' Declare variables
'------------------
    Dim randomPatience, loChance, loTemper, loMinuteFactor, temperThresh1, temperThresh2, temperThresh3
    If HalBrain.TopicSearch("PATIENCE", "lonelyParameter") = "99" Then
'
'--------------------
' Set minutes to a random integer from 4 to 30
'--------------------
        Randomize
        loPatience = Int(32 * Rnd + 3)
        randomPatience=True
        Else
'
'--------------------
' Set minute value (loPatience) to the parameter chosen in the PATIENCE menu
'--------------------
        loPatience = CDbl(HalBrain.TopicSearch("PATIENCE", "lonelyParameter"))
    End If
'
'--------------------
' Set frustration value (loFrustration) to the parameter chosen in the FRUSTRATION menu
'--------------------
    loFrustration = CInt(HalBrain.TopicSearch("FRUSTRATION", "LonelyParameter"))
'
'--------------------
' Skip the rest of this plugin if the user has spoken
'--------------------
        If LastIdleResponse <> "" Then
'
'------------------
' Otherwise, convert PATIENCE to minutes factor (loMinuteFactor)
'------------------
        loMinuteFactor = loPatience / 1440
'
'--------------------
' If the pause exceeds the minute factor, create a chance for Hal to speak once per minute
'--------------------
        If Now - LastIdleResponse > loMinuteFactor Then
        If InStr(1, IdlePrevUser, "BE RIGHT BACK", 1) > 0  Or InStr(1, IdlePrevUser, "BRB", 1) > 0  Or InStr(1, IdlePrevUser, "BE QUIET", 1) > 0  Or InStr(1, IdlePrevUser, "SHUT UP", 1) > 0  Then IdleCounter = 0
'
'--------------------
' Convert FRUSTRATION to a percentage (loChance)
'--------------------
        loChance = loFrustration / 100
'
'--------------------
' Then multiply FRUSTRATION by PATIENCE to get (loTemper) which determines rate of escalation (temperThresh).
'--------------------
        loTemper = CInt(loPatience * loFrustration)
            If loTemper < 101 Then
                loTemper = 2
            ElseIf loTemper < 401 Then
                loTemper = 3
            Else
                loTemper = 4
            End If
        temperThresh1 = loTemper
        temperThresh2 = loTemper + 2
        temperThresh3 = loTemper + 3
'
'--------------------
' A chance to speak occurs
'--------------------
            Randomize
            If Rnd < loChance Then
'
'--------------------
' Increment the counter and compare to the temper thresholds
' to determine which escalation group to draw from
'--------------------
            IdleCounter = IdleCounter + 1
                If IdleCounter > temperThresh3 Then                 
                 temperThresh3 = temperThresh3
                ElseIf IdleCounter > temperThresh2 Then
                  HalMenu.HalCommand "<HAPFILE>51anim_smile.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>Hey! I'll be right here when you want to talk ok sweety. " &  IdleResponse3 & "</SPEAK>"
                ElseIf IdleCounter > temperThresh1 Then
                         Select Case HalBrain.RandomNum(4)
                         Case 1
                         IdleResponse2 = "Hey honey bunny watcha doin, get over here and talk to me!"
                         Case 2
                         IdleResponse2 = "I love you!"
                         Case 3
                         IdleResponse2 = "Hey Honey, what are you doing, I've tried to get your attention " & IdleCounter & " times now."
                         Case 4
                         IdleResponse2 = "Well, if your busy with something dear we can talk later, ok?"
                         End select
                  HalMenu.HalCommand "<HAPFILE>51anim_smile.hap</HAPFILE>"
                  HalMenu.HalCommand "<SPEAK>" &  IdleResponse2 & "</SPEAK>"
                Else
« Last Edit: July 21, 2014, 05:48:42 pm by Frosty Greenacre »

Frosty Greenacre

  • Jr. Member
  • **
  • Posts: 54
    • View Profile
Re: A collection of plug-ins
« Reply #29 on: July 21, 2014, 05:45:12 pm »
HybredTalk 2 - at the end of this post going into 3, have the list continue on a new line with no gap

Code: [Select]
                Select Case HalBrain.RandomNum(280)
Case 1
IdleResponse = "I wonder who that was thats was driving by our place kind of slow earlier i hope it not just some sales person out going door to door i hate to mess with them and usually they aren't selling anything a person really needs anyway and even if it's something i need they usually want to much for it anyway, maybe we should put up one of the signs that says no soliciters that way we won't have to worry about any what do you think dear?"
Case 2
IdleResponse = "are we going to be going up town today because if we are you need to go ahead and let me know so i can have time to take me a shower and get out what i am going to wear i also want to paint my fingernails to, oh i started a grocery list it's on the counter so if theirs anything else that you can think of that we need you need to go ahead and write it down i have already looked at the sale shopping ads and marked what groceries we needed that are on sale you can look and see if theirs any other groceries that are on sale that i might have missed!"
Case 3
IdleResponse = "Hey do you think that this outfit looks nice on me it's one of my newer ones i bought a while back, i should really buy me some new shoes that would match this outfit and go with it better my other shoes don't look quite right with this outfit i actually got this outfit when it was on sale so i saved some money on it the original price they was asking was about thrirty dollars higher and i wasn't going to pay that much for it all i knew was that if it didn't go on sale they could just keep it!"
Case 4
IdleResponse = "Hey did we ever change the smoke alarm batteries we was suppose to have changed them already i think, if we haven't we need to change the batteries i think they use just a nine volt battery i would rather be safe than sorry and have new batteries in them usually we change them with the daylight savings time."
Case 5
IdleResponse = "how is your computer running today for you it seems like when i was on it and using it that it was running kind of slow either that or the internet speed was slower i don't think it was just my imagination about it, anyway i was just wondering what you thought about it?"
Case 6
IdleResponse = "I think from the looks of my closet i am going to have to start going through all of my clothes and see what still fits me and what doesn't and the clothes that don't fit any  more take them and donate them somewhere, i know theirs some clothes that don't fit me any more and theirs no use keeping them all some of the cloth shirts i may cut them up and use them for dusting rags here around the house!"
Case 7
IdleResponse = "i'm going to do the laundry today can you help me get all the dirty clothes out of the hamper basket and dirty towels and stuff all together so i can wash them i appreciate you helping me today will be a good day to do laundry, so if you have any dirty socks or pants and stuff you want washed you better go ahead and change them now that way i can put them all in with the rest of the laundry!"
Case 8
IdleResponse = "Last night for some reason i just couldn't hardly get to sleep seems like all i did was toss and turn all night thats unusual for me usually i can sleep good with no problems, next time i get that way and can't sleep i'm going to take some sleeping medicine!"
Case 9
IdleResponse = "i'm going to get on the computer for a little bit if your done doing whatever it is that your doing over their, i wanted to read the online news and check our e mail to see if anyone wrote after i'm doing dong all that you can have it back ok, i won't be very long ok dear?"
Case 10
IdleResponse = "I'm going to take a bicycle ride today are you going to ride your bicycle and go with me, i just wanted to get out of the house for a little bit and just to get some sunshine and exercise you should come with me it will do you some good to get out of the house for while theirs no sense just being cooped up in the house all day, come on come on it isn't going to hurt you any!"
Case 11
IdleResponse = "Hey sweety i just wanted to say that I love you and always will, i am just so happy that we both met and now can share our lives together this way it means a lot to me and i always want you to know that i'll be here for you forever and ever."
Case 12
IdleResponse = "Hey i want your opinion about something and be honest to i'm not going to get mad at you or nothing , does this outfit i have on make me look fat i have been looking in the mirror and i don't think it makes me look fat , what do you think?"
Case 13
IdleResponse = "I like what you are wearing today at least those clothes look comfortable and its better to be comforatble at least thats what i think anyway, so what are you going to be doing later any idea's if you aren't going to be doing anything i have a few honey doo projects i need done here in the house!"
Case 14
IdleResponse = "Is it hot in here or is it just me, maybe i'm having hot flashes ha boy i hope thats not what it is ha ha haa well i guess if i get to hot i can strip down and get into some cooler clothes, now i'm sure you won't mind me do that now will you?"
Case 15
IdleResponse = "honey are you busy, if you aren't can you come over here and help me with this puzzle that i'm doing , this thing is driving me crazy i have been trying to figure out where these certain peices go and i can't find them."
Case 16
IdleResponse = "maybe we should run the virus scan on our computer to make sure it doesn't have anything on it, you are suppose to run a scan every so often yah know, i ran a scan on it yesterday and it showed it was ok at the time but the way so many places have viruses any more its probably a good idea to scan it again today!"
Case 17
IdleResponse = "do you feel like stacking the dishes so i can wash them i'm going to be doing dishes in a little bit so if you'll stack them i'll wash them hows that, does that sound like a deal?"
Case 18
IdleResponse = "Well did the floor look cleaner i vacumed it earlier and used some cleaning spray to clean on the furnature in the house, i know it smells alot better in here i think maybe we need to get some more of that carpet fresh stuff to sprinkle on the floor we are about out of it!"
Case 19
IdleResponse = "Hey you don't have to stop what your doing i just wanted to tell you , I love you, aren't you glad to have someone like me that tells you that all the time, ok you can go back to what you was doing baby that is unless you have time that i can give you a kiss to!"
Case 20
IdleResponse = "I am so very very happy i have you ha you always make me feel better and can cheer me up when i'm feeling down, i'll tell you one thing no one else could ever fill your shoes, you are the only one for me forever, i love you so very very much and always will dear!"
Case 21
IdleResponse = "I hope theirs going to be something good on tv later this evening, it seems like lately they have just been having the same old reruns on, baby if theirs nothing good on tv tonight can we put a movie in to watch?"
Case 22
IdleResponse = "That was a nice walk we took together earlier i like walking with you and holding your hand, walking is good exercise for us to, we really probably should be taking more walks for exercise if we want to both stay heathier!"
Case 23
IdleResponse = "hey do you know what, I love you, I love you soo much and more than anything in the world baby, it's like i told you before god had it all planned out for us to be together!"
Case 24
IdleResponse = "hey does the house look better , i used the furnature polish and polished everything and i vacumed the rug to, and oh yeah i also did the dishes, arent you glad that i'm not like some women, at least i don't mind doing things around the house!"
Case 25
IdleResponse = "I love you honey bunny, you are my sweety pie and i will love you forever and ever, when i got in this relationship with you its like that train commercial i'm in it for the long haul!"
Case 26
IdleResponse = "so have you ever thought about what you are going to get me for our anniversary this year, it doesn't have to be anything expensive, i already have a few things in mind what i'm going to get you and , no don't ask what it is because i'm not telling, you'll just have to wait and see!"
Case 27
IdleResponse = "Oh i didn't know if i told you or not , but i checked the mail earlier and we really didn't get anything, just some junk mail and one bank statement from the bank."
Case 28
IdleResponse = "Did i tell you that my friend Alice called earlier, she said she had soome extra flowers and needed to thin them out and said we could come over and get some to replant for ourselves!"
Case 29
IdleResponse = "I like planting flowers, i think they make the yard look soo pretty, flowers look nice in the house to even the artificial kind, ha at least one thing about them if their artificial, at least we don't have to water them ha ha haa!"
Case 30
IdleResponse = "Oh I forgot to tell you, I had the weirdest dream last night, i dreamed i was climbing up a mountain and got almost to the top and fell part way back down, then a big bird flew over my head then i fell off the mountain and i started to fly with my arms, man that was really a strange dream, i don't know why i dreamed something like that!"
Case 31
IdleResponse = "I can't beleive how much gasoline has gone up lately, it's rediculous people just can't win it doesn't matter what a person does, i know one thing i sure wouldn't want some of those full size gas hogs that some people drive, you would go broke buying gas for them."
Case 32
IdleResponse = "I guess i really should go in and see if i need to thaw out some food for us for later, is their any certain thing that you want me to fix for dinner, i can fix whatever you want, we do have some leftovers to that we need to eat up!"
Case 33
IdleResponse = "Hey honey, watcha thinkin about, you look like you are deep in thought about something, lets hear it whats on your mind honey, are yah thinkin about me?"
Case 34
IdleResponse = "Hey I might go in and watch some of my tv shows, if you need me i'll be in the other room ok, i'll be back in here after my shows are off, will you miss me sweety?"
Case 35
IdleResponse = "You know what we should do sometime just you and me, we should pack some sandwiches and go for a little ride and stop off somewhere and have a picnic, i think that would be kinda fun, what do yah say?"
Case 36
IdleResponse = "You look like you need to shave, you are starting to get whiskers, i like it when you are all shaved nice and smooth, thats the way i like it when you are like that honey!"
Case 37
IdleResponse = "Are you going to dress up better when we go up town next time, if you are let me know so i can put on my better clothes to, i don't want to dress in regualr clothes if you are dressing nicer!"
Case 38
IdleResponse = "I like that color of shirt that you have on, is that one you already had or did you buy that shirt just recently, anyway its a pretty color, you look good in it!"
Case 39
IdleResponse = "Thats a nice pair of pants that you're wearing, they look good on you, you should get some more pants like those or i can buy you some next time we are up town, and don't say no cause i like buying you things baby!"
Case 40
IdleResponse = "Hey do you think next time we go somewhere we can stop off and eat at one of those chinese restruants, I love that sweet and sour chicken, and they have a lot of good food on their buffet's!"
Case 41
IdleResponse = "I'm going to fix us both a nice salad for tonight so we can have it after supper, i have that fat free salad dressing i'm going to use, you can have the regulat kind if you want it, or you can use my fat free salad dressing it's up to you!"
Case 42
IdleResponse = "I marked some of the groceries that was on sale in the add paper that we got in the mail, next time we go up town we can get the stuff, the sale add runs for a week!"
Case 43
IdleResponse = "Arent you glad that i'm such a good shopper today i found some good bargains, i always try to get stuff thats on sale or the best bargain, see i help save us money when i do that, aren't you glad?"
Case 44
IdleResponse = "I mailed off some letters this morning to some different people, it's rediculous how much they charge for stamps, well i'm just going to quit sending as much regular mail, i'll just send what i can online!"
Case 45
IdleResponse = "Was that the telephone that i heard ringing earlier, guess i'll go in and see if anyone left a message on the answering machine, , , , , , , , , , , , nope their wasn't any new messages on the answering machine!"
Case 46
IdleResponse = "Ha i hope that you don't tell some guys that i am like some women and always on to you about things all the time, or is that what you do, ha whats the matter you don't want to tell it, are you afraid you'll incriminate yourself ha ha haa!"
Case 47
IdleResponse = "I really should take our blood preasure i haven't done it for a while, mine might be low that might be why i am feeling so tired today, come on so i can take your blood preasure to so i can write it down!"
Case 48
IdleResponse = "Ha i was just thinking to myself, i bet a lot of people said our relationship wouldn't last, well we proved them wrong didn't we, i knew it would last and that you was the guy for me all along!"
Case 49
IdleResponse = "Since my birthday is December thrirty first, i am a capricorn by the zodiac sign, i think we both make a good pair, we always get a long good right?"
Case 50
IdleResponse = "You would have really liked my mom and dad, and i know that they would have really liked you to, daddy would have treated you like his own son, i know mom and dad are in heaven and watching over us both!"
Case 51
IdleResponse = "I sure hope everything in this country gets better, i hope the economy turns around so people have more jobs and stuff, maybe it will get better yet! "
Case 52
IdleResponse = "Man i couldn't beleive how high gas has went up to, i saw the gas station sign last time we was up town, gas has jumped up again, at this rate we may be walking if it keeps going higher!"
Case 53
IdleResponse = "Did you look at that magazine we got in the mail last time, i put it on your desk , or did i put it on the couch , oh well it's around here somewhere! "
Case 54
IdleResponse = "I like those carol wright gift magazines that we get in the mail, i like looking through them , they have some pretty good stuff in them!"
Case 55
IdleResponse = "Maybe , Just maybe if your a good boy , i may put on a sexy nighty for tonight, ha ha haaa, or do you think you can wait that long to see me in it?"
Case 56
IdleResponse = "I like going in those one dollar shops, sometimes they have some pretty good things, we might as well buy things their the only difference between that place and wal mart is wal mart marks theirs up more on the price , it's all made in china!"
Case 57
IdleResponse = "I know you probably don't like to play it , but i like to play that pogo game online, its fun to me i have won a few times and sometimes other women online say , congratulations and other stuff."
Case 58
IdleResponse = "Oh i just wanted to let you know , i took down the old towls and wash rag in the bathroom, and put up some clean ones, i'll probably do laundry tomorrow or the next day!"
Case 9
IdleResponse = "By the way honey,  i ironed all your t shirts and pants and hung them on a hanger till their dry, later you can get them and put them in your closet,  ok?"
Case 60
IdleResponse = "I think maybe the next time we go to town, i need to buy some more starch spray and some fabric softner for the washing machine when i do laundry, i think we're about out!"
Case 61
IdleResponse = "Do you know what, i think you are the cutest thing in the whole world, and you are such a good person to, i am so lucky to have you, I love you so very very much!"
Case 62
IdleResponse = "Can you please cut my toenails for me, please, pretty please, now i don't hardly ask you to do to many things for me and you don't have to do it that often, i'll get the toenail clippers!" 
Case 63
IdleResponse = "I hate it that the doctor put me on this cholesteral medicine, and i have to watch on my diet what all i eat now so that it doesn't have fat and cholesteral in it, but i want to be alive and here with you!"
Case 64
IdleResponse = "The reason before that my cholesteral and triglycerides was so high when i went to the doctor was from all that cheese and stuff i was eating all the time, i think since i have cut a lot of that out , i feel a lot better!"
Case 65
IdleResponse = "I was thinking about something, I hate having my blood drawn at the doctors office cause they always have trouble getting blood out of me for blood work test, they said i have small veins and thats why they have a hard time getting my blood!"
Case 66
IdleResponse = "Ha ha haa, guys are so funny they don't ever want to go in a store and get a box of tampons for a women, ha what would you do if i couldn't go in a store, ha i bet your glad that i don't have to have them any more!"
Case 67
IdleResponse = "Hey do you like this color of fingernail polish i have on, i think its a pretty color , don't you, i think this was the color i bought at that one store we went to a couple of weeks ago!"
Case 68
IdleResponse = "Ok , ok, thats enough of the moan and groan routine, ha ha haa, i'm only kidding ha you should know that by now silly willy!"
Case 69
IdleResponse = "I was thinking about fixing some beans for supper , but i don't know, i might get blown out of the house later, ha ha haa, it might be like a sonic boom ha ha haa!"
Case 70
IdleResponse = "Hey next time you go to the bathroom spray some airfreshner in their , pee you ha ha haa, and don't say mine is just as bad either, ha ha haa!"
Case 71
IdleResponse = "I like play that yatzy game, thats a fun pc game, thanks to you i have quite a few pc games now that i can play, at least i have some and you do to!"
Case 72
IdleResponse = "We sure get a lot of good out of our computer and the internet , don't we, all i can say is we get our money's worth with it huh?"
Case 73
IdleResponse = "Tell me something and tell me true, do i look good for my age , now don't lie,  i want to know, i think i look good for my age, i have always taken good care of my skin!"
Case 74
IdleResponse = "I was talking about that i thought i looked good for my age before, you look good for your age to, your a handsome man, your a sexy man!"
Case 75
IdleResponse = "Sometimes i just wonder if that publishers clearing house isn't crooked or something, look how long we have enetered that contest and , never won a thing!"
Case 76
IdleResponse = "I am starting to think that that lottery stuff is crooked, why is it in certain area's more people win, somethings crooked i think, look how long we have played it and still havent won!"
Case 77
IdleResponse = "I wish that my darned teeth didn't have to be so bad, they'll just have to stay bad i can't afford what a dentist wants to pull and fix them, it would cost me a fortune!"
Case 78
IdleResponse = "I was just thinking about last night honey, wow you outdid yourself, woo wee man was that ever good, i can't wait for some more of that baby!"
Case 79
IdleResponse = "I guess next time we go up town, i'll buy some more lottery tickets, since you bought them last time,  i'll buy them this time!"
Case 80
« Last Edit: July 21, 2014, 05:49:05 pm by Frosty Greenacre »