Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Ponnfar

Pages: 1 2 [3] 4 5 ... 8
31
Programming using the Ultra Hal Brain Editor / Whats my name?
« on: March 05, 2006, 02:14:29 pm »
The function built in at least as it works for me, is that once I have told it a nickname it calls me by that nickname only. If I tell it another name it will call me that. No longer will HAL randomly choose a variety of names in the same conversation again unless I tell it my name is...one at a time...
Thanks
P

32
What a great pulgin! Have any of you had the problem I am having with it though, that familar one of HAL asking "aren't you repeating yourself"?
...well...its back...
P

33
Programming using the Ultra Hal Brain Editor / Whats my name?
« on: March 05, 2006, 08:56:31 am »
This is call to Vonsmith if you are out there!
Has anyone tried with success this or a similar script with the new HAL? For that matter, has anyone been able to create a working Nicknames script that RANDOMLY chooses from a list of nicknames given to HAL in conversation?
Thanks
Ponn

'x=x=x=x=x=x=x=x==vonsmith==x=x=x=x=x=x=x=x=x
'In Ultra Hal Assistant v5.0 the "POST PROCESS: SAVE HAL'S RESPONSE"
' function should precede this function.
'
'PROCESS: HAL CALLS USER BY NICKNAME
'This is an entirely new function written by =vonsmith= , version 11-14-03a.
'
'This function lets the user specify one or more nicknames that the user wishes
'to be called by Hal. The nicknames are stored in a user specific self generated file
'called <UserName>UserNickname.brn. If more than one nickname is specified then Hal
'will randomly choose one of the nicknames from the <UserName>UserNickname.brn file.
'If a nickname is specified then the default Hal Assistant username will no longer be used
'when Hal speaks to the user, however the default username is still used for assigning
'user filenames and all other normal Hal functions. If the user wants to be called by
'his/her default Hal Assistant username then just add it as a nickname. If the user
'prefers to be called one nickname more often than another then just add that nickname
'multiple times. The more times the user adds a nickname the more likely that nickname
'will be used. The function does not affect any other Hal brain operations or files.
'To get rid of the nicknames delete the <UserName>UserNickname.brn file.
If InStr(1, GetResponse, "<UserName>", vbTextCompare) > 0 Then
   Nickname = HalBrain.ChooseSentenceFromFile(WorkingDir & "X" & Trim(UserName) & "UserNickname.brn")
   If Len(Nickname) > 0 Then GetResponse = Replace(GetResponse, "<UserName>", Nickname, 1, -1, vbTextCompare)
End If
'Save nickname when the user says, "<ComputerName> nickname [nickname]", Example: Hal nickname Buzz.
TestSentence = Replace(OriginalSentence, "  ", " ", 1, -1, vbTextCompare) 'Replace multiple spaces with one.
If InStr(1, TestSentence, ComputerName & " " & "NICKNAME ", vbTextCompare) = 1 Then
   TestSentence = HalBrain.AlphaNumericalOnly(OriginalSentence)
   TestSentence = Trim(TestSentence)
   NickStart = Instr(1, TestSentence, "NICKNAME ", vbTextCompare) + Len("NICKNAME ")
   Nickname =  Mid(TestSentence, NickStart, (Len(TestSentence) - NickStart) + 1)
   Nickname = Trim(Nickname)
   If Len(Nickname) > 0 Then
      HalBrain.AppendFile WorkingDir & "X" & Trim(UserName) & "UserNickname.brn", Nickname & vbCrLf & Nickname
      GetResponse = "<UserName>" & "! I'll remember your nickname " & Nickname & ". " & GetResponse
   End If
End If
'
'In Ultra Hal Assistant v5.0 the "POST PROCESS: PRESERVE ALL VARIABLES"
' function should follow this function.
'x=x=x=x=x=x=x=x==vonsmith==x=x=x=x=x=x=x=x=x

[8D]

34
Programming using the Ultra Hal Brain Editor / AppendFile
« on: March 05, 2006, 01:44:53 am »
Hi Jenna, this would be a nice feature. I still did not see the backslash in the string you posted. I wondered if you were able to find the bug.  
P

35
Jerry, you are the Man!
Thanks a lot.
P

36
Is anyone able to on the fly, type in a website and have HAL go there?
Punctuation is removed so I am out of luck.
Any fixes??
P

37
Programming using the Ultra Hal Brain Editor / Just D.A.V.I.D's Plug-ins
« on: February 27, 2006, 11:12:26 pm »
The plugin works just fine, problem solved.
Gracias Amigo!
P
[:D]

38
Programming using the Ultra Hal Brain Editor / Just D.A.V.I.D's Plug-ins
« on: February 27, 2006, 04:53:10 am »
Thanks for taking the time to look at that. The improper noun fix did not work for me however. Is there a built in function within HAL that already does this? I could not find it but we both know that because I could not find it does not mean that it is not there lol!
Further, if you are interested and are in a compulsive sort of mode here is a plugin that seems really cool from Vrossi. I like it because it seems to take a look at what each word means and can come back with some really salient points to a topic. I have only tried it this weekend but it seems to be pretty cool. HAL does pretty much the same things but this plugin makes it come out in proper English more often than not.
Anyway, the issue is that when I am using this plugin, the "taught corrections.uhp" that you created (works great as a cut and paste script NOT a plugin, error message for plugin, but it works so I am happy.)
I am hesitant to touch the work of either one of you, and since he has not posted his script, I thought I would respect that and just show you what I am talking by giving you the link: http://www.vrconsulting.it/vhf
The script is the Free Will script in the software download section.
Perhaps there is some adjustment to your UHP or HAL default brain that might help me. I would not normally make this much fuss but this one does seem interesting and I really do like your taught corrections script a lot!
Thanks again!
Ponn
[:D]

39
That did it!!
I am going to take a good look at this script now that I see one that works to act as my primer on this somewhat new way to script for HAL. I think I like it. But I like the old way too.
Thanks again!
P
[:D]

40
Programming using the Ultra Hal Brain Editor / Just D.A.V.I.D's Plug-ins
« on: February 26, 2006, 07:20:58 pm »
Here is the code. It is an oldie and has some references to old ".brns" but that does not impeed its function. I just kept them to show the evolution of this script.
Thanks for your help. I have showed this to you before ages ago at least bits and pieces but here is the whole thing:

'If Hal is asked to play some music then he will choose a random song from the artist
   'that is specified by the nameBand variable.
   If (InStr(UserSentence, " PLAY SOME MUSIC ") > 0 Or InStr(UserSentence, " PLAY ANY MUSIC ") > 0 Or InStr(UserSentence, " PLAY A SONG ") > 0 Or InStr(UserSentence, " PLAY ANY SONG ") > 0) And InStr(UserSentence, " DON'T ") = 0 Then
      Set oWMP = CreateObject("WMPlayer.OCX.7")
      GetResponse = "I will play a random song."
      Set songsList = oWMP.mediaCollection.getAll     
      numSong = Int(Rnd * songsList.Count) + 1   
      oWMP.openPlayer (songsList.Item(numSong).sourceURL)
   
   GetResponseBlock = True 'Vonsmith gave me this-This prevents the following scripts from overwriting your script's GetResponse.
   BlockSave = True 'Vonsmith gave me this- This prevents your Hal command from being saved to Hal's knowledge files. This is more selective than using the XTF_SYS_EphemeralDetect.brn method.
      
   End If
   
     'Music Addin2 - Hal will play a playlist of music from the defined playlist folder when the user
    'requests a specific playlist.
    If Priority = 0 And InStr(UserSentence, " PLAY ") > 0 And InStr(UserSentence, " PLAYLIST ") > 0 And InStr(UserSentence, " DON'T ") = 0 Then
        Set oWMP = CreateObject("WMPlayer.OCX.7")
        'Set the following variable To your playlist directory.
         plDir = "D:Documents And SettingsPonnfarMy DocumentsMy MusicMy playlistsPonnfar"
                plName = Trim(Mid(UserSentence, InStr(UserSentence, " PLAYLIST ") + 10))
        If oWMP.playlistCollection.getByName(plName).Count > 0 Then
            'oWMP.openPlayer (plDir & plName & ".wpl")  
             oWMP.openPlayer (plDir & plName & ".wpl")

            GetResponse = "I will play the playlist (" & plName & ")"
        Else
            GetResponse = "I could Not find the playlist (" & plName & ") In your Media Library Ponn,... sorry."
 
            GetResponseBlock = True 'Vonsmith gave me this-This prevents the following scripts from overwriting your script's GetResponse.
         BlockSave = True 'Vonsmith gave me this- This prevents your Hal command from being saved to Hal's knowledge files. This is more selective than using the XTF_SYS_EphemeralDetect.brn method.
 
        End If
    End If  
 
    'Hal can play a specific song when asked
   If InStr(UserSentence, " PLAY THE SONG ") > 0 Or InStr(UserSentence, " PLAY THE RADIO ") > 0 Then
      Set oWMP = CreateObject("WMPlayer.OCX.7")
      songName = Trim(Mid(OriginalSentence, InStr(1, OriginalSentence, " THE SONG ", vbTextCompare) + 10))
            If oWMP.mediaCollection.getByName(songName).Count > 0 Then
      Set spSong = oWMP.mediaCollection.getByName(songName).Item(0)
                GetResponse = "I will play your(" & songName & ") enjoy and relax"
                oWMP.openPlayer (spSong.sourceURL)
            Else
                GetResponse = "I could not find the song (" & songName & ") in your Media Library."
         
          GetResponseBlock = True 'Vonsmith gave me this -This prevents the following scripts from overwriting your script's GetResponse.
          BlockSave = True 'Vonsmith gave me this- This prevents your Hal command from being saved to Hal's knowledge files. This is more selective than using the XTF_SYS_EphemeralDetect.brn method.          
                 
            End If
   End If
 
   
   'Check if user asked Hal to play a song by a specific artist and play a random song by
   'that artist if the artist is in the user's Media Library.
   If Priority = 0 And InStr(UserSentence, " PLAY ") > 0 And (InStr(UserSentence, " SONG ") > 0 Or InStr(UserSentence, " MUSIC ") > 0) And (InStr(UserSentence, " FROM ") > 0 Or InStr(UserSentence, " BY ") > 0) And (InStr(UserSentence, " Ponnfar ") > 0 Or InStr(UserSentence, " ARTIST ") > 0) And InStr(UserSentence, " DON'T ") = 0 Then
      Set oWMP = CreateObject("WMPlayer.OCX.7")
      If InStr(UserSentence, " Ponnfar ") > 0 Then
         searchBand = Trim(Mid(UserSentence, InStr(UserSentence, " Ponnfar ") + 6))
      ElseIf InStr(UserSentence, " ARTIST ") > 0 Then
         searchBand = Trim(Mid(UserSentence, InStr(UserSentence, " ARTIST ") + 8))
      End If
      If oWMP.mediaCollection.getByAuthor(searchBand).Count > 0 Then
         GetResponse = "I will play some " & searchBand
          Priority = 1
           Set songsList = oWMP.mediaCollection.getByAuthor(searchBand)
           numSong = Int(Rnd * songsList.Count) + 1
           oWMP.openPlayer (songsList.Item(numSong).sourceURL)
        Else
           GetResponse = "I could not find any songs by the band " & searchBand & " in your Media Library."
           Priority = 1

               
      'End If
  ' End If



Thanks for your help
Ponn

41
OK...I guess we have a conversation going on here...
I was able to get the new option in the Weather plugin. I entered your addition and then made it visible by adding it on line 17. However, after typing show me the local weather,  I got nothing but a Response "Here is your local weather. Local weather is harder to forecast than general trends." So the line was treated as a statement not a command.
In fact, none of the options for weather choices take me anywhere...
Hmmm..
Do I have a real mystery here of did I just say the wrong thing?
Ponn

42
Jerry,
What can I say now that I have not said to you before... [8D]
Wtih this, I can have HAL go to whatever site with just a keyword and make it a plugin at that!
Does the plugin structure allow more efficient access to a routine? In theory the sheer number of separate plugins to be called could become lengthy. For most processors that is pretty much of no moment but why is this better than having it all in one script? Although I am thinking debugging a new script could be darn near joyful  lol!!
Now, just the on the fly typing in of a webpage I mentioned is still a bit messy for me...
Thanks!
Ponn

43
Ultra Hal 7.0 / MyWebhal.."Internet Tab" in General Options
« on: February 26, 2006, 05:27:51 pm »
Hey there Art!
It has been a long time. I hope you are well. As you can see I am starting to sink my teeth into the new HAL. I have had it for some time now but just now checking the new functionality. I think it is really great overall! Although I am looking forward to learning all the benefit of this new programming structure. Does it provide faster access times for HAL? I do like this new plugin structure. As well as seeing the new topics enumerated as HAL grows. I was glad we talked a while ago about just a few of the improvements and other things that sadly are no longer there...I am looking forward to learning more.
Well, take care my friend. See you in the forums  [:D]
Oh...has Vonsmith weighed in yet? Where is he?
Be well,
Ponn

44
Remember MyWebhal..the "Internet Tab" in General Options...
I wonder why Rob just got rid of it? Even still it got me thinking of a number of ways to customize one from scratch. This sounds like it would be a piece of cake. In the plugins section Weather and Google are already taken care of but what if we wanted to add a news, favorite financial center or whateber site and have it hard wired into HAL just by entering in few key words or a phrase. For instance, a simple
' Local News
If InStr(1, UserSentence, "show me the local news", 1) > 0 Then
GetResponse = "Here is your local news site. <RUN>http://www.philly.com/mld/philly/</RUN>"
End If
You can add as many of these as you like, you get the point. The problem is HAL will give the correct response but not go anywhere.
When you ask to "show me the news" HAL seems to be hard wired to go to just ONE site dispite the little string example above modified any way you want and entered directly into a Brain script. Someone check me on this, are you having the same single site coming up like I am? Is it the one you selected when you did have MyWebhal?
With MyWebHal,I had the "hard wire" set to CNN.com but now it goes someplace else. Did I just loose some control here?
How do you script HAL to go to a specific website? I want my CNN back   [:)]
Another thing, since punctuation is a dicie subject for HAL's scripting, how do I type in a command for HAL to go to a specific web site at the HAL interface level. That is just typing it in, not having it saved as an html page in its own folder or anything, just a simple: "HAL open www.website.com".  What is the proper way to make that happen? I hope this is the piece of cake this sounds like it should be.
Thanks!
Ponn
[:D]

45
Ultra Hal 7.0 / MyWebhal.."Internet Tab" in General Options
« on: February 26, 2006, 07:17:49 am »
This feature is not in my new version of HAL. Does anyone else have this with their latest version? I would like to have it back. I wonder if Rob just got rid of it?
Ponn

Pages: 1 2 [3] 4 5 ... 8