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 - mike920

Pages: [1]
1
Ultra Hal Assistant File Sharing Area / Scripts, addins, and extras
« on: April 10, 2005, 09:13:33 am »
quote:
Originally posted by HALImprover

Check this out. Simply create a folder in the main folder (C:/Program Files/Zabaware/Ultra Hal Assistant 5) called 'read' and add in the code from the following link. Next, put any text files that you want Hal to read in the 'read' folder and say to Hal;

readfile filename

 where filename is the name of the text file in the read folder (do not put the .txt entension). For example;

readfile astronomy
hi,
first i am a bit of a beginner on this.
I have tried to make Hal read using your second corrected script but no go.
I have copied the script into the new read directory. Do I need to rename it and what file extension should I use.
many thanks
Mike

 and Hal will read the first paragraph of text from C:/Program Files/Zabaware/Ultra Hal Assistant 5/read/astronomy.txt

 The only warning is that the code will only read from the beginning of the text file to the first line break (like when you press the Enter key), so to read a story with multiple paragraphs you would have to delete any extra line breaks. Otherwise, hope this helps, and enjoy!

P.S. If Mr. M. would implement the ability to detect when Hal is finished speaking (as I suggested previously), I could develop this code to read any format of text file (ie. multiple paragraphs, etc.).

P.P.S. Here are some text files with common knowledge to teach to Hal. I will try posting new files every week.

 Happy coding [:)]

Download Attachment: ReadingAddin.txt
962 Bytes

Download Attachment: CommonKnowledge1.txt
59.89 KB

Download Attachment: CommonKnowledge2.txt
62.67 KB


2
Ultra Hal Assistant File Sharing Area / Scripts, addins, and extras
« on: April 10, 2005, 09:12:20 am »
quote:
Originally posted by HALImprover

Thanks for your interest and sorry that the code didn't work as expected. I guess I went about the text file reading method in a way that the Hal script does not support. But don't worry, I have modified the code (and tested it this time) to work with an existing file reading method already built into Hal.

Download Attachment: ReadingAddin.txt
908 Bytes

Also, here are some more common knowledge files to teach to Hal.

Download Attachment: CommonKnowledge3.txt
82.27 KB

Download Attachment: CommonKnowledge4.txt
81.45 KB

Enjoy! [:)]


Pages: [1]