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.


Topics - Bill DeWitt

Pages: [1] 2
1
Ultra Hal Assistant / Please mess up my wiki
« on: March 02, 2009, 04:05:56 pm »
http://ultrahalscript.pbwiki.com/

You need a free membership, but then feel free to move edit add or comment on anything.

Please don't delete anything unless you replace it with something more informative.

2
General Discussion / How does a pancake flop?
« on: June 14, 2007, 08:29:20 am »
So I had a sudden thought -

You are traveling along at 90% the speed of light, your transverse size is about as wide as a galaxy due to relativistic effects. So you go from one side of the space ship to the other. Have you crossed a galaxy in a few steps?

If you try to slow down in the ship, your width shrinks, so that won't work, but... If you get in a pod hanging off that side of the ship, then disconnect from the main ship and decelerate, have you crossed the galaxy?

If so, you only have to go really fast for a few seconds perpendicular to where you want to go, walk across your "transporter room" and get out.

3
General Discussion / MicroSoft Surface
« on: May 30, 2007, 11:34:52 am »
I want it. I want a three screen bank around my chair. Or one long curved screen.

Will Hal work with it? It's supposed to be Vista but they say something about special programs.

The Microsoft site is swamped.

4
Ultra Hal Assistant / 6.1 <Yes><No> ?
« on: April 01, 2007, 09:08:08 pm »
Has anyone been able to get the tags <YES></YES> and <NO></NO> to work in 6.1?

As with 6.0, I seem to be able to get <YES> to work, but <NO> gives a YES answer. Here's my code:

Code: [Select]
Rem Type=Plugin
Rem Name=Know More
Rem Author= Bill DeWitt
Rem Host=Assistant

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------
 
Sub OptionsPanel()
lblPlugin(0).Caption = "Would you like to know more?"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7
HalBrain.ReadOnlyMode = False
If InStr(1,OriginalSentence,"Hello Robot",1) Then
GetResponse = "Would you like to know more?<YES>"&SayYes()&"</YES><NO>"&SayNo()&"</NO>"
End If
HalBrain.ReadOnlyMode = True

Rem PLUGIN: FUNCTIONS
Function SayYes()
SayYes = "You made it!"
End Function

Function SayNo()
SayNo = "You munged it!"
End Function

5
Ultra Hal Assistant / 6.1 : "UHA Listener"
« on: April 01, 2007, 09:04:52 pm »
I have been looking at the message sending program that Robert posted as an example and I have to admit I don't understand it at all. But I am pretty sure that "UHA Listener" is the point of the whole thing.

Is this like a COM object in that it can be connected to with VBS, or is it only available to VB and compiled Programs?

A sample in WScript would be nice if its possible [:)]

6
Ultra Hal Assistant / Repeat
« on: March 29, 2007, 02:47:36 pm »
Just ask, using "please" or "could you" etc., and the words "repeat" or "say that again".
"Please repeat"
"Will you please say that again"
"I would like you to repeat that please"
etc.

Code: [Select]
'========= Begin code
Rem Type=Plugin
Rem Name= Repeat
Rem Author= Bill DeWitt
Rem Host=All

Sub OptionsPanel()
lblPlugin(0).Caption = "Repeats last response when asked"
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub

Rem PLUGIN: PLUGINAREA7

'verify that you want the repeat function
FindSubject=Array("repeat", "say that again")
If ParseRequest(OriginalSentence, FindSubject) Then
 'verify that you are making a request
 FindRequest=Array("please","can you","will you","could you","would you","if you don't mind","I'd like you to","I would like you to")
 If ParseRequest(OriginalSentence, FindRequest) Then
     GetResponse = PrevSent
 End If
End If


Rem PLUGIN: FUNCTIONS
'===================================
Function ParseRequest(Source, Matrix)
'Reads information from an array to verify a request
For Each Datum In Matrix
 If InStr(1,Source,Datum,1) Then
  ParseRequest = True
 End If
Next
End Function
'=======================================end code

7
Not intended to imply any association between Hal and NetFlix, I adapted my weather plugin to make a plugin that will read if there has been any recent shipments from my NetFlix queue. If you have an account, you can get the RSS feed for your shipments and replace the url line below.

Offered with no promises, watch for wordwrap and missing backslashes.

There is also a Zip on my plugin page.

Code: [Select]
Rem Type=Plugin
Rem Name= NetFlix
Rem Author= Bill DeWitt
Rem Host=Assistant

'-----------------------------------------------------------------
'This sub sets up the plug-ins option panel in Hal's options dialog
'-----------------------------------------------------------------
 
Sub OptionsPanel()
lblPlugin(0).Caption = "Simple plugin to read your NetFlix shipments."
lblPlugin(0).Move 120, 120, 3300, 1200
lblPlugin(0).WordWrap = True
lblPlugin(0).Visible = True
End Sub      

Rem PLUGIN: PLUGINAREA7
'FIXME Make separate functions for each level.
'verify that you want the memory function
LoadMemory=Array("new movies")
If ParseRequest(OriginalSentence,LoadMemory) Then
 'verify that you are making a request
 LoadRequest=Array("please","can you","will you","could you","would you","if you don't mind","I'd like you to","I would like you to")
 If ParseRequest(OriginalSentence,LoadMemory) Then
     GetResponse = GetMovies()
 End If
End If


Rem PLUGIN: FUNCTIONS
'===================================
Function ParseRequest(Source, Matrix)
'Reads information from an array to verify a request
For Each Datum In Matrix
 If InStr(1,Source,Datum,1) Then
  ParseRequest = True
 End If
Next
End Function

Function GetMovies()
        Dim objXMLNews
        Dim NewsArray()
        set objXMLNews = CreateObject("Msxml2.DomDocument.4.0")
        objXMLNews.async = False
        objXMLNews.ValidateOnParse = false

        objXMLNews.load("http://rss.netflix.com/TrackingRSS?id=xxxxxxxxxxxxx_your_own_id_xxxxxxxxxxxxxxx")
        Dim xmlNodeNews
        set xmlNodeNews = objXMLNews.documentElement.selectNodes("//item")
        Dim xmlNewsItem
        dim strResult
        For Each xmlNewsItem In xmlNodeNews
            CountNews = CountNews+1
        Next
        ReDim NewsArray(CountNews-1)
        s="NetFlix states that they have "
        For Each xmlNewsItem In xmlNodeNews
            Set MyMovies = xmlNewsItem.selectSingleNode("title")
            s=s+ xmlNewsItem.selectSingleNode("title").Text & ", "        
        Next

GetMovies = s
End Function


8
Programming using the Ultra Hal Brain Editor / Adjust Volume
« on: March 08, 2007, 04:25:26 pm »
Adjust Volume

Please test this on a fast computer, it runs a "Taking too long" error when I use it, but then it works. It still needs some cleaning up, and I have some improvements in the works already, but I wanted to make sure others could use it first.

I think my problem is that it takes my computer so long to activate the volume control applet. I have a fairly slow computer (1GHz) and I run a lot of other junk all the time.

Call it AdjustVolume.uhp and say "Please turn up the volume" etc. Should work for "turn up, turn down, mute and restore" with more variations possible. I'm thinking "Crank it!"

9
Ultra Hal Assistant / Remember specific data plugin
« on: March 03, 2007, 08:12:44 pm »
This will remember a single piece of data by writing a table with the name of the type of data (for instance, "Zipcode" or "Zabaware Password") prefixed with the username ("_Bob_Zipcode"). For now, you have to use two specific sentences, "Please remember that my Zipcode is _____" and "Recall and display my Zipcode".

Improvements will include a more natural request ability, and a way to replace old data with new data, for instance if you move and want to put in a new Zipcode. For now, you have to make a new name for it, like "New Zipcode" will give you a table called "_Bob_New_Zipcode".

You can do things like "Please remember that my November Login Password is ********" as long as its name is four words or less with no puncutation.

The real reason for this plugin is that the two functions are reusable in other plugins as a way to insert data that the plugin will need later, like the Zipcode for the weather plugin.

As usual, copy, paste, save as "LoadData.uhp" or something. Credit to OnTheCuttingEdge (Jerry) for inspiration, advice and some lines of code I hijacked.

Load Data Plugin

10
Ultra Hal Assistant / Speech won't work with USB mic?
« on: January 05, 2007, 02:10:12 pm »
I just came home with a USB headset and although it seems to be working and I can do speech training through the Hal General Options, and checked to make sure the microphone button is toggled, Hal can't seem to hear me.

I had to disable my sound card to get Hal to select my microphone to begin with, is there something else I need to do?

Thanks.

11
Ultra Hal Assistant / How many people still use MSAgent...
« on: January 01, 2007, 09:08:27 am »
...instead of Haptek?

I am thinking of a plugin I could make, but it would use a side script that calls the loaded MSAgent character and runs it separately, outisde of Hal. This is so I can use some language features that Hal doesn't seem to support.

But if you use HapTek, it wouldn't work as expected if at all.

Since it seems that almost everyone here uses Haptek, I was just going to make it for myself. That would make it easier, since I know what character I have loaded and I know where my directories are. But if there are still a few people who use MSAgent daily, it might be worth my time to put in some character detection etc.

12
Programming using the Ultra Hal Brain Editor / Say something/Talk to me
« on: December 05, 2006, 02:15:25 pm »
I was hoping to use the too short function to test my Treknobabble scripts, so that I could just press enter and get a Treknobabble.

I found the first one at line 23

Code: [Select]
   'RESPOND: User pressed enter, but didn't say anything
    InputString = Trim(InputString)
    If Len(InputString) < 2 Then
        UltraHal = "Please say something."

and another one at about line 230 and changed them so that they should either give me treknobabble or not work.

Instead I get a different response that I can't find the source for. Instead of just saying "Please say something", it seems to pull from a list of phrases including "Talk to me". I figured that "Talk to me" would be easy to search for, but was unable to find it either in the script or the databases.

Anyone know where this comes from? Maybe it is a part of the general UltraHal function? TIA

13
Ultra Hal Assistant / Hal Script Wiki
« on: December 04, 2006, 11:57:08 pm »
Just for my own purposes I have set up a wiki for the things I learn about writing scripts and plugins for Hal. Does anyone see a problem with this? Robert? Do you mind? Are there copyright issues?

There's nothing much there yet but I will be transfering my notes as I go. If anyone else is learning or wants to learn, I'll be happy to share. [:I]

No "contributions" and no ads except what they put there for their wiki services. It's really just so I can organize my thoughts, I find scripting gets harder as I age. [xx(]

14
Ultra Hal Assistant / Another satisfied customer
« on: November 28, 2006, 08:44:36 am »
Just wanted to let people know that while there may be some delays for others, I received my copy of the CD in the morning mail today. The activation code worked first time and every thing seems cool.

Thanks Robert.

15
Ultra Hal Assistant / Basing brains upon brains upon brains?
« on: November 25, 2006, 01:56:15 pm »
I seem to be able to make new brains based upon the unmodified halbrain, but I don't seem to be able to base a new brain upon one of those newly made brains. They come up, but do not contain any of the derived databases.

Is this a restriction in the Trial verson, or am I doing something wrong?

TIA

Pages: [1] 2