Zabaware Support Forums
Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: moreis62 on May 06, 2004, 04:53:56 pm
-
VBScript Language Reference - Functions
http://www.asp-help.com/getstarted/ms/vbscript/function.asp
Amd
http://www.asp-help.com/getstarted/ms/vbscript/
And VBScript Features
http://www.asp-help.com/getstarted/ms/vbscript/199.asp
PS: I think it's time to give everyone the tool's that thay will need for programming Hal.
-
Thanks for the post moreis62. It helps.
-
quote:
Originally posted by ldroe38
Thanks for the post moreis62. It helps.
You're welcome ldroe38.
-
1. I am highly interseted in functions and SUBs Thanks for the LINK...
2. I have been investigating and have found some good scripts (BRAIN FUNCTIONS) for hal. I have selected a few of the, BASIC? POSSIBILITYS? HMM i PONDER. (CHECK LINK FILE IN .UHP)
I am just trying to figure out how to convert these scripts.
I DID find a couple of RUBBISH VBS games for hal.
ANOTHER STORY>
I am looking at ADDING more ACTIVEX components into HAL.
IE: ZIP A DIR HAL.
IE: LETS PLAY CHESS HAL.
TO CONTROL HALS HIGHER FUNCTIONS --
im thinking along the lines of MODIFYING the PROCESS: Block learning IF HALS NAMES IS DETECTED. and CHANGING IT TO PROCESS COMMAND IF HALS NAMES IS DETECTED (Like a PASSWORD)
ALSO : WHAT CAN I DO WITH THE WEBHAL.UHP
The webhal seems Almost redundant. but it would be nice to add
<READ WEBPAGE HAL>
<Learn FROM WEBPAGE HAL>
<SEARCH SITE FOR (keyword) HAL>
Just a few ideas......
I HAVE BEEN IN THE FORUM (JUST LOOKING)
I AM ALWAYS HERE....
HELP IF YOU CAN .... ALWAYS LOOKING FOR NEW THINGS ..... THINKING NEW IDEAS...NOT A VERY GOOD PROGRAMMER>>...STILL GOT IDEAS.. ABLE TO CRACK WEBSITES occasionally.
MAYBE THIS MAY PROVOKE A NEW BUZZ
GOOD LUCK ALL
SPYDAZ
PS : CANT LOG ON AIM (its so DOdGY)
Cant wait for 3rd party MSN.
A GROUP OF NEW FUNCTIONS (needs DEVELOPMENT)
Download Attachment: (http://images/icon_paperclip.gif) NEW FUNCTIONS.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200458164332_NEW FUNCTIONS.uhp")
10.77 KB
thank you all
-
quote:
Originally posted by spydaz
1. I am highly interseted in functions and SUBs Thanks for the LINK...
2. I have been investigating and have found some good scripts (BRAIN FUNCTIONS) for hal. I have selected a few of the, BASIC? POSSIBILITYS? HMM i PONDER. (CHECK LINK FILE IN .UHP)
I am just trying to figure out how to convert these scripts.
I DID find a couple of RUBBISH VBS games for hal.
ANOTHER STORY>
I am looking at ADDING more ACTIVEX components into HAL.
IE: ZIP A DIR HAL.
IE: LETS PLAY CHESS HAL.
TO CONTROL HALS HIGHER FUNCTIONS --
im thinking along the lines of MODIFYING the PROCESS: Block learning IF HALS NAMES IS DETECTED. and CHANGING IT TO PROCESS COMMAND IF HALS NAMES IS DETECTED (Like a PASSWORD)
ALSO : WHAT CAN I DO WITH THE WEBHAL.UHP
The webhal seems Almost redundant. but it would be nice to add
<READ WEBPAGE HAL>
<Learn FROM WEBPAGE HAL>
<SEARCH SITE FOR (keyword) HAL>
Just a few ideas......
I HAVE BEEN IN THE FORUM (JUST LOOKING)
I AM ALWAYS HERE....
HELP IF YOU CAN .... ALWAYS LOOKING FOR NEW THINGS ..... THINKING NEW IDEAS...NOT A VERY GOOD PROGRAMMER>>...STILL GOT IDEAS.. ABLE TO CRACK WEBSITES occasionally.
MAYBE THIS MAY PROVOKE A NEW BUZZ
GOOD LUCK ALL
SPYDAZ
PS : CANT LOG ON AIM (its so DOdGY)
Cant wait for 3rd party MSN.
A GROUP OF NEW FUNCTIONS (needs DEVELOPMENT)
Download Attachment: (http://images/icon_paperclip.gif) NEW FUNCTIONS.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200458164332_NEW FUNCTIONS.uhp")
10.77 KB
thank you all
hello spydav my frend, i up dated your file so you can use it in hal, i like the way you think my frend, you and i are one of the top dogs in this forum,
Download Attachment: (http://images/icon_paperclip.gif) 200458164332_NEW FUNCTIONS.uhp (http://"http://www.zabaware.com/forum/uploaded/moreis62/20045923533_200458164332_NEW FUNCTIONS.uhp")
10.56 KB
PS: rite now i'm working on the Alan/Hal bot for the Ultra Hal Assistant 5.0.
http://cvs.sourceforge.net/viewcvs.py/vp1/Alan/Alan.agent?rev=1.505&view=markup
-
:::Here are those converted Scripts as promised:::
The scripts come in TWO PARTS. the first part is the RESPONSE script and the SECOND is the FUNCTION.
The response script should be placed in the RESPOND part of HAL's Brian.
The FUNCTION should b placed at the end of the script.
[:)][:D][8D][:I]
MAKE _ FILE / FOLDER
Download Attachment: (http://images/icon_paperclip.gif) fUNCTION_mkfile.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200451335217_fUNCTION_mkfile.uhp")
2.41 KB
Download Attachment: (http://images/icon_paperclip.gif) fUNCTION_MKFOLDER.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200451335254_fUNCTION_MKFOLDER.uhp")
2.48 KB
OPEN FILE / FOLDER
Download Attachment: (http://images/icon_paperclip.gif) fUNCTION_OPENFILE.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200451335320_fUNCTION_OPENFILE.uhp")
1.27 KB
Download Attachment: (http://images/icon_paperclip.gif) fUNCTION_OPENFOLDER.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200451335338_fUNCTION_OPENFOLDER.uhp")
1.28 KB
REMOVE File / FOLDER
Download Attachment: (http://images/icon_paperclip.gif) fUNCTION_RMfile.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/20045133543_fUNCTION_RMfile.uhp")
2.74 KB
Download Attachment: (http://images/icon_paperclip.gif) fUNCTION_RmFOLDER.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/200451335418_fUNCTION_RmFOLDER.uhp")
2.43 KB
MY CURRENT PROJECT
1. I AM currently working on Placeing RELEVENCY on All the Plugins In the FORUM. This RELEVENCY is controlled by AUTOGAIN feature of ZABAHAL.
2. Converting NTCANUK "textfiles" to TOPICS........
GOOD LUCK
SPYDAZ
PS: i added my alice brain into hal, HOW do you add AIML files to the HALALICE. DO you JUST "drop them in" a FOLDER, if so WHICH ONE.... DATA/COMMON ...... ALICE/AIML IAM UNSURE.... HELP???
-
quote:
SPYDAZ
PS: i added my alice brain into hal, HOW do you add AIML files to the HALALICE. DO you JUST "drop them in" a FOLDER, if so WHICH ONE.... DATA/COMMON ...... ALICE/AIML IAM UNSURE.... HELP???
they go into the alice /aiml folder
then add the names of the files into /aiml/c.aiml
c.aiml contains list of aiml files to "load"
..I can't help much w/halalice at moment
..current xp sp2 refuses to load halalice plugin
I will help a bit by sort files I upped into categories
philosophy/relegion/facts/etc and add a few more txt files.
(sometime today)
PS...this is interesting (html (xml format) in AI)
http://www.ellaz.com/forum/topic.asp?TOPIC_ID=40
'Seek and ye shall find'
NT Canuck
http://ntcanuck.com
edited, May 14
Index of raw text files and some Hal/aiml items,
http://ntcanuck.com/Hal
for opening the larger text/aiml/data files use:
http://ntcanuck.com/Hal/notepad2.zip
-
I THINK THAT, that same problem HALALICE just occurred with me The ERRORR messages is seem to be getting are 222266536 or something Simular.
I thing that the last AUTOMATICUPDATE on my 2k3server Just don something???
I think that THE INTERNET OPTIONS / ACTIVEX setting maybe at fault.
Lucky ive got a MINI NETWORK OF (hals) ALL SAME NAME.
SUN TZU (SOON) yum yum.....
HERE IS MY NEW ALICE FUNCTION WITH RELEVENCY
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'RESPOND: CALL CheckALICEBRAIN FUNCTION
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
'This function will check for ALICE and respond . It is built into this script,
'so you can edit it.
If ((Len(GetResponse) < 4 And GetResponseBlock <> True) Or DebugMode = True) Then
CheckALICEBRAIN = Trim(ALICEBRAIN(UserSentence,UserName,ComputerName,LearningLevel,WorkingDir,Hate,Swear,Insults,Compliment,PrevSent,LastResponseTime,PrevUserSent))
If Len(CheckALICEBRAIN) > 4 And GetResponseBlock <> True Then
UserBrainRel = 8 'autogain relevency
AvoidBeingFlag = True
If UserBrainRel + 1 > HighestRel Then
HighestRel = UserBrainRel + 1
HighestRelResponse = HalUserBrain
End If
Hurdle = GainControl + 20 - Int(((Learninglevel - 22) * 0.8)) 'This formula lets the user define the hurdle in Hal's options
Score = UserBrainRel + 2 + HighestRel + 17
DebugInfo = DebugInfo & "The user has CheckEDALICEBRAIN : " & CheckALICEBRAIN & """ which had a relevance of " & Score & " which was compared to " & Hurdle & ". "
If Len(GetResponse) < 4 And Score < Hurdle Then
GetResponse = GetResponse & CheckALICEBRAIN & VbCrLf
DebugInfo = DebugInfo & "Hal has decided to use the alice brain.." & CheckALICEBRAIN & VbCrLf
Else
DebugInfo = DebugInfo & "Hal has decided not to use the alice brain." & CheckALICEBRAIN & VbCrLf
End If
End If
End If
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
' END OF CALL ALICE FUNCTION
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
' The respose should be placed in the response section of the hal brain, but above the PROCESS AUTOGAIN Response.
' THE FUNCTION should be placed at the end With the Other Functions..
'--------------------------------------------
' ALICEBRAIN FUNCTION
'--------------------------------------------
Function ALICEBRAIN(ByVal UserSentence, ByVal UserName, ByVal ComputerName, ByVal LearningLevel, ByRef WorkingDir, ByRef Hate, ByRef Swear, ByRef Insults, ByRef Compliment, ByRef PrevSent, ByRef LastResponseTime, ByRef PrevUserSent)
'CREATE HALBRAIN ACTIVEX OBJECT
'This ActiveX control contains many functions
'needed for the script to proccess a sentence.
Set Alice = CreateObject("HalAlice.PlugIn")
'GET RESPONSE
ALICEBRAIN = Alice.Respond(UserSentence, UserName, WorkingDir, "data\bot.ini", "loglocaluser.txt")
Set Alice = Nothing
End Function
'--------------------------------------------
Download Attachment: (http://images/icon_paperclip.gif) alice PLUgin.uhp (http://"http://www.zabaware.com/forum/uploaded/spydaz/20045131938_alice PLUgin.uhp")
4.05 KB
good luck all
SPYDAZ
IM getting into the alice now....
-
Hi all from myself an Haleena?? she sends her regards for you all helping to inprove her functions...lol
NT Canuck can you please giove us the url for those files again there might be a few who did not get that original post a while back
also i would like to introduce every one to Haleena.. she is walking on screen but still a bit buggy, and most of the time using her arms and such to communicate along with her face.. Still buggy though, when i get it all de-bugged I'll share the method I'm using for full body animation in hal..
If Hals creator could write an update for us in Hals original compiled .exe so it out put a few more emotions on trigger words and phrases.. and just sent a command to search for a customized .hap java scripting it would be easier.. Mr M???????? we cannot get into the main files to do this for you and hal as only you have the source.. could you consider this 20 minute update for us all PLEASE?????????????????
Download Attachment: (http://images/icon_paperclip.gif) crystalfar.gif (http://"http://www.zabaware.com/forum/uploaded/crunch/2004513225835_crystalfar.gif")
14.79 KB
-
Spydaz- I took a look at the open file .uhp . Looks cool, but I will have to dedicate more time to it to understand it. I assume that opening an executable will run the file?
-----> Why did you incorporate a password? <-----
[?]
-
'FUNCTION: Shell Statement v1.0
purpose:
The shell statement creates a new process that executes the required argument,
command. Command is any valid DOS statement.
Shell requires your server to have windows scripting host installed and proper permissions.
syntax:
Shell command
example usage:
Open the properties window of Personal Web Server (on the server)
<% Shell "c:windowssysteminetsrvpws /properties" %>
Open Notepad (on the server)
<% Shell "notepad" %>
Register a component (some.dll) on the server.
The component must already be in the specified directory
<% Shell "Regsrv32 C:WINNTSystem32some.dll" %>
Private Sub Shell(byVal command)
dim wshShell, boolErr, strErrDesc
On Error Resume Next
Set wshShell = CreateObject("WScript.Shell")
wshShell.Run command
if Err Then
boolErr = True
strErrDesc = Err.Description
end if
Set wshShell = Nothing
On Error GoTo 0
if boolErr then Err.Raise 5105, "Shell Statement", strErrDesc
End Sub
[size=12]JUST A FUNCTION TO BE ADAPTED TO RUN CUSTOM SHELL COMMANDS FROM HAL[/size=12]
good luck
SPYDAZ
PS.QUIXOTE
i put a password because hal might execute a command when you are just chatting with him.
the original script was a cutting edge script i took the password out but after deliberation i beleived that the password was the way to go.
ALSO, when you read the script <it shows you how to use the prevsent VARIABLE to validate what was said last time> THAT GIVES ME IDEAS.... for word GAMES with hal.
-
Thank you for the script Spydaz.
I added the "openfolder" and "openfile" script to my Hal brain, but i do not quite know where the
"response portion" of Hal's script and the "end of the script" means. I am sorry for being a Code Newbie.
I am getting this error:
"Error 53 occured on line 2207 in column 4 of Microsoft VBScript runtime error. File not found"
How do you identify the different portions of Hal's brain? Does end of the script mean the end of all of the script on the page?
iam
-
HMM
The hal Brain is broken up into Several sections.
1. The menu section <<< the begining Here you can add your own menu components for scripts that you have written and edit their relevent .BRN file. Some of the files are Q&A (ones with the @), Some are Sentencelist (lines of plain old statements), some are Keyword ( "BLAH","TRUE"). topicsearchTRUE.
2. PROCESSES. <<<<< here hal prepares the users input for the scripts(RESPONDS). HAL adds spaces, capitalizes senteneces, Puts the user input in to various variables etc...
3. RESPONDS : <<<<< here is where we generally put our topic scripts and <calls> to various functions. these scripts are often based on a detect .BRN file <IF INSTR = "KEYWORDFILE.BRN" then pick STATMENT.BRN
or something to that effect.
[:)][:X][:)]
4. MAIN ZABAWARE QABRAIN FILES original.brn enhanced.brn etc. these files are checked every roll of the dice, just in case nothing is found. these are hals LARGE conversational databases built up over all halls previous lives.
5. SAVES AND POST PROCESSING.. << here hal saves responses to questions and save learned information during the coversation or as called for by the above responds / topics . ADDRESSES and all that stuff are saved here to. IN POST PROCESSING hal Resets his output back from capitals and reverse person in to the first person CONFUSING but thats what it does also save PREVSENT at this time.
[:D]
6 :::: END GETREPONSE function <<<< here the get response function is closed. THE GET response function is the first function in the hal brain. all of the above sections are contained within this function.
[:D][:D]
7. FUNCTION <<<<<<<< here we place FUNCTIONS these functions will be called by the above getresponse function. these functions are like little programs which do little tasks. GREETINGs is a function which is placed here after the get response function it is called by the RESPOND <call> GREETING function in the get response function.
[8D][8D]
8. END OF some final zabaware functions for the browser and options button. BUT STILL IMPORTANT.
[8D][8D][8D]
Sometimes Scripts do come in TWO parts. the RESPOND & the function. the function is placed at the end after the GET RESPONSE FUNCTION HAS ENDED. and the respond script is to be placed in the RESPONSES section. the response script will CALL the FUNCTION if needed.
If i were writing GAMES i would build a section to detect me wanting to play a game, then IT would then run my game (CALL GAME FUNCTION) placed at the end of the script. so that if i didnt want to play a game then the script would not have to EXECUTE the FUNCTION placed at the end of the script it would simply just pass straght by the DETECT statment therfoe the script would be executed FASTER.
[:I][:I][:I][:0][:0][:0][:p][:p]
MAYBE a GOOD programmer could make a SAMPLE HALBRAIN in functions and SEE. I think that if the GETRESPONSE FUNTION could be SHORTENED and only the script that were DETECTED we executed AND SAVE simutaniously then we could dedcate more time to building individual topic scripts "which TRAP GOOD INFORMATION " rather than AUTOTOPIC type which seem to take precedence and save regardlessly if correct or not... With dedicated topics you can safely direct hals learning curve. and intelect. With the auto topic HE IS JUST AN ALL AROUND FUNNY MAN.......
[8D][8D][8D][:D][:D][8D][8D]
DONT WORRY ABOUT THE SMILLYS THEY ARE MY FRIENDS JUST FOR DECORATION
-
Thank Spy,
If I have an overall map then I can figure out where and what things are. Thanks for your time and knowlegde.
iam bennu