46
Ultra Hal 7.0 / A challenge for all VBScript programmers out there
« on: July 09, 2003, 11:19:49 am »
Hi Everyone,
I need help!!
Some forum members have been providing script to insert into the brain files. The script is something like:
If InStr(1, UserSentence, "favorite band", 1) > 0 Then
GetResponse = "RUSH is my favorite band"
End If
The problem here is that it if one places too many instructions like this into the mainbrain.uhp (I have a 20 meg file-full of definitions I want Hal to learn)it can make the brain file unmanagably large.
A solution would be to include a link to another file. For instance,
assume I type into hal: 'define house' - Hal could process this as follows
MainBrain.uhp
If InStr(1, UserSentence, "define", 1) > 0 Then
Go to File2
End If
File2.uhp
If InStr(1, UserSentence, "define house", 1) > 0 Then
GetResponse = "a house is the physical structure we live in"
End If
Return to MainBrain.uhp
As you can see, I could have all my definitions in a separate bulky file (flie2.uhp)which only ever gets opened when I ask Hal for a definition. By doing this, the main halbrain.uhp could remain relatively small and fast.
Now for the problem: I do not know what command within the text would make hal temporarily visit the file2.uhp for the definition. Nor do I know the command to get Hal to return to the MainBrain.uhp once he has provided the definition.
Do any of you VBScript experts know how to do this
Thanks - Psych
I need help!!
Some forum members have been providing script to insert into the brain files. The script is something like:
If InStr(1, UserSentence, "favorite band", 1) > 0 Then
GetResponse = "RUSH is my favorite band"
End If
The problem here is that it if one places too many instructions like this into the mainbrain.uhp (I have a 20 meg file-full of definitions I want Hal to learn)it can make the brain file unmanagably large.
A solution would be to include a link to another file. For instance,
assume I type into hal: 'define house' - Hal could process this as follows
MainBrain.uhp
If InStr(1, UserSentence, "define", 1) > 0 Then
Go to File2
End If
File2.uhp
If InStr(1, UserSentence, "define house", 1) > 0 Then
GetResponse = "a house is the physical structure we live in"
End If
Return to MainBrain.uhp
As you can see, I could have all my definitions in a separate bulky file (flie2.uhp)which only ever gets opened when I ask Hal for a definition. By doing this, the main halbrain.uhp could remain relatively small and fast.
Now for the problem: I do not know what command within the text would make hal temporarily visit the file2.uhp for the definition. Nor do I know the command to get Hal to return to the MainBrain.uhp once he has provided the definition.
Do any of you VBScript experts know how to do this
Thanks - Psych