Zabaware Support Forums

Zabaware Forums => Programming using the Ultra Hal Brain Editor => Topic started by: wgb14 on December 23, 2005, 09:17:55 pm

Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 23, 2005, 09:17:55 pm
Hi all,

I pose this question to the forums for quite some time now but without ever getting an answer. I wonder, if there is an ActiveX control that would allow me to integrate HAL into my own applications. To be more specific, i need my users to input text into my Macromedia Director application and get a reply from HAL inside the director application. I am already doing that with alice, but HAL seems more efficient in his conversations.

Thanks in advance
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 25, 2005, 05:56:26 pm
No replies yet. Anyone people!!! Please help. I really would like to know if there is such a think as an activex

Thanks
Title: ActiveX (oxc control for Hal)
Post by: Art on December 25, 2005, 07:11:57 pm
wgb14,

I thought perhaps KT or Spydaz might be able to help in this area.
KT was / is active with using Alice and Spydaz had experimented with a lot of external applications.

Sorry I can't be of any help but hopefully someone more well versed in these areas will step forward.

Good luck!
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 25, 2005, 07:58:03 pm
Hi,

Thanks for your reply! Is there any way to contact these people?

Thanks
Title: ActiveX (oxc control for Hal)
Post by: Art on December 26, 2005, 08:29:41 am
Sure,

At the top right, select Members.
Click on Knytetrypper.
Lower left, Select Send email to user

Locate Spyday (same page)
repeat steps.

Title: ActiveX (oxc control for Hal)
Post by: freddy888 on December 26, 2005, 10:46:55 am
I noticed that in Visual Basic a Hal component can be imported into Applications.  I'm afraid I don't know any more than that as I never tried it out.  Mr M might would be able to give you the answer but I suspect he is gonna be busy.
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 26, 2005, 01:02:28 pm
<<Mr M>>

Thank you all for you replies but Who is Mr M?

Thanks
Title: ActiveX (oxc control for Hal)
Post by: vrossi on December 26, 2005, 03:51:45 pm
Mr.M is short for Robert Medeksza, who is the creator of Hal. We usually call him in this way, because his surname is really difficult to spell.

You can try to reach him clicking on Members and then selecting Medeksza. Do not expect him to answer you quickly, because in these days he is very busy. But I'm sure he reads every post and finally he will reply.
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 27, 2005, 12:42:16 am
Hi,

I emailed Mr M and hope that i will get a reply soon. Thansk for all your help.
Title: ActiveX (oxc control for Hal)
Post by: spydaz on December 27, 2005, 06:51:13 am
I have Found That if you BUY the FULL HAL PRODUCT you dont GET anything MATE.

NO activeX ocx /. DLL
NO free UPGRADE (although a POKE in the program always informs you about upgrades)
No hardly any thing ....
The only thing you get when you buy the HAL IS the program / SAME AS THE DEMO but it can read popups on screen an speech aspects are no on.
I have BEEN DISSAPOINTED in THE HAL program. especially now that it has been upgraded....
AS a program developer i would have liked to have seen PREVIOUS VERSIONS AT LEAST HAL 3 to become fully OPEN SOURCED... I personally reverse engineered thed WHOLE PROGRAM NOW. But i will not share my files any more as I HAVE NOW SEEN SOME OF The guys on this forum using MY IDEAS or OTHERS in comercially avaiable PROJECTS. THEIVES....
I used to like hal before when IDEAS were flowing, Their STILL FLOWING, But WHY NO FREE UPGRADE, WHY SUCH POOR RESPONSES TO PERSONAL EMAILS. Why only HALF A CD...
it sadens me.... using this website to Steal IDEAS From PEOPLE.
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 27, 2005, 11:26:40 am
Hi spydaz,

I understand you concerns. However, in my case i am not trying to develop any commercial product. I am just a PhD student who is stragling with the very limited resources of his university. I am just trying to get my PhD degree, nothing more nothing less. I can send you my full details if you want to verify what i am and what i am doing. Perhaps then you can agree to share your files with me? Please let me know what you think.

Thanks
Title: ActiveX (oxc control for Hal)
Post by: Art on December 27, 2005, 05:05:32 pm
Leroy,

Why don't you take a moment and tell us how you really feel?!

You used to be a great source of info and interaction on this forum but you seem to have dropped off for some time (Welcome back).

Ideas are not privy to just one person. I've seen code written by three different people here that do the same task and almost look the same. It's not unusual in the programming world.

Regarding Robert's Hal, a LOT of members gave him permission to use any of their ideas or scripts as he saw fit for the final release of Hal. Most of these ideas or script snippets were features most of us wanted to see in the final release anyhow and before Robert included any of them, permission to use, was volunteered by most of the membership at that time.

I'm personally sorry if anyone stole your script or ideas and used them for commercial purposes but this is a public forum not a private think tank. Using one's program or script is one thing, but to claim it as one's own creation is lying, pure and simple.

I hope you can get these personal issues resolved and I hope justice comes to those responsible for the theft of your material.

All the best as always!
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 27, 2005, 05:49:53 pm
Hi all,

OK I agree with both of you but this does not change the fact that i still need help on a topic that i can not find a solution. Any volunteers please?????
Title: ActiveX (oxc control for Hal)
Post by: GrantNZ on December 27, 2005, 07:06:22 pm
AFAIK there're no ActiveX capabilities at this time. Unless someone comes up with a workaround, I think you'll need help from Mr M himself on this.

Cheers,
Grant
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 27, 2005, 08:04:44 pm
I have already sent an email to Mr M. Let's hope that he will help me. Many many thanks to all the people that tried to help me.

Bests
Title: ActiveX (oxc control for Hal)
Post by: Medeksza on December 28, 2005, 03:02:33 am
Ultra Hal Assistant 5.0 had an easy to use ActiveX method in the HalBrain.DLL to do this, but this was not updated to support Hal 6.0 type brains. I am currently working on an updated version of Zabaware's "Ultra Hal Representative" product that would provide all the programming functionality that you want. I have no estimated release date as of yet, but it will be sometime in 2006.

However if you want to do this today, it is not too hard to do this functionality yourself. Hal's brain is basically a VBScript. You can interface with Hal's VBScript the same way that the main Hal Assistant executable interfaces with it: Using the Windows Script Control, which is an ActiveX control. In addition to the windows script control, you also need to acess the activex objects UltraHalAsst.Brain and UltraHalAsst.WN

I'm not too familiar with Macromedia director, but here is some simple VB6 code that will run the Hal6 default brain, maybe you can do something similar in macromedia director. The following code is initialization code required to setup all the activex controls needed to run Hal's brain:
Code: [Select]
   'Declarations of objects and variables
    Dim HalBrain As Object
    Dim WN As Object
    Dim HalScript As Object
    Dim ScriptCode As String
   
    'Create instances of activex controls
    Set HalBrain = CreateObject("UltraHalAsst6.Brain")
    Set WN = CreateObject("UltraHalAsst6.WordNet")
    Set HalScript = CreateObject("MSScriptControl.ScriptControl")
   
    'Read script source code into variable
    Open "Hal6.uhp" For Input As #1 'May need to provide full path to UHP file
    ScriptCode = Input(LOF(1), 1)
    Close #1
   
    'Setup script control and database
    HalScript.Language = "VBScript"
    HalScript.UseSafeSubset = False
    HalScript.AllowUI = False
    HalScript.AddCode ScriptCode
    HalScript.AddObject "HalBrain", HalBrain, True
    HalScript.AddObject "WN", WN, True
    HalBrain.OpenDatabase "HalBrain.db"  'May need to provide full path to Hal's database
If you are able to, I recommend doing this initialization code just once, not for every sentence the user inputs to Hal. It will work just fine if you do it for every sentence, but it just adds overhead. Once the objects are setup, you can make a call to Hal's brain like this:
Code: [Select]
   ScriptOutput = HalScript.Run("UltraHal", UserSentence, UserName, ComputerName, LearningLevel, ScriptCurDB, Hate, _
        Swear, Insults, Compliment, PrevSent, LastResponseTime, PrevUserSent, Custommem2, Relevance, Topicfocus)
    VariableList = Right(ScriptOut, Len(ScriptOut) - InStr(1, ScriptOut, "<storevars>", vbTextCompare) + 1)
    HalsResponse = Left(ScriptOut, InStr(1, ScriptOut, "<storevars>", vbTextCompare) - 1)
    Custommem1 = DecodeVar2(VarList, "Emotion")
    Hate = DecodeVar2(VarList, "Hate")
    Swear = DecodeVar2(VarList, "Swear")
    Insults = DecodeVar2(VarList, "Insults")
    Compliment = DecodeVar2(VarList, "Compliment")
    PrevSent = DecodeVar2(VarList, "PrevSent")
    LastResponseTime = DecodeVar2(VarList, "LastResponseTime")
    PrevUserSent = DecodeVar2(VarList, "ScriptMem2")
    Custommem2 = DecodeVar2(VarList, "ScriptMem3")
    Relevance = DecodeVar2(VarList, "ScriptMem4")
    Topicfocus = DecodeVar2(VarList, "ScriptMem5")
The variable names should be pretty self-explanatory. Most variables will be initialized by the script if passed empty on the first query. The user's input sentence is UserSentence and Hal's output sentence is HalsResponse. It is your responsibility to keep track of the other variables between queries in some way as this is Hal's short term memory.

And cleanup code would be (which may only be run during shut down of your program, or for every query, depending on your implemenation:
Code: [Select]
   HalBrain.CloseDatabase
    Set HalScript = Nothing
    Set WN = Nothing
    Set HalBrain = Nothing

This implementation does not support Hal's on the fly plugins. It also has no queueing or collision detection needed for good multi-user support. You will have to wait for Ultra Hal Represtative to come out to get these features in an easy to use ActiveX control. Since there is no collision detection, if you want to use Hal in a multi-user environment such as a web server than you must disable Hal's learning, as if Hal is talking to 2 people at once and tries to write new information to its database simultaneously, a crash and possible data corruption will occur. If learning is off then Hal only reads from the database and there is no problem
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 28, 2005, 03:44:05 am
Hi Mr M

Thanks for your reply! Your code seems understandable but unfortunately I can not implement it in director. You see the problem is that director can access functions provided by external programs only through an imported ocx module. There is no other way to do that. Hence, I will have to wait untill the release of the updated product. However, as my timeframe is limited may i ask if it is possible to give me a provisional date for the release and also let me know if you are planning to pack the functions of HAL into such ocx?

Thanks
Title: ActiveX (oxc control for Hal)
Post by: moreis62 on December 29, 2005, 02:08:14 am
quote:
Originally posted by wgb14

Hi Mr M

Thanks for your reply! Your code seems understandable but unfortunately I can not implement it in director. You see the problem is that director can access functions provided by external programs only through an imported ocx module. There is no other way to do that. Hence, I will have to wait untill the release of the updated product. However, as my timeframe is limited may i ask if it is possible to give me a provisional date for the release and also let me know if you are planning to pack the functions of HAL into such ocx?

Thanks


Short for OLE Control Extension, an independent program module that can be accessed by other programs in a Windows environment. OCX controls end with a .ocx extension. OCX controls represent Microsoft's second generation of control architecture, the first being VBX controls written in Visual Basic.
Both VBX and OCX controls have now been superseded by ActiveX controls. However, ActiveX is backward compatible with OCX controls, which means that ActiveX containers, such as Microsoft's Internet Explorer, can execute OCX components.

Sorry it only works with in the Ultra Hal Assistant 5.0 for now.

Title: ActiveX (oxc control for Hal)
Post by: wgb14 on December 29, 2005, 10:41:04 am
Hi moreis62

<<Sorry it only works with in the Ultra Hal Assistant 5.0 for now.>>

What is working only with Ultra Hal Assistant? Do you have an ocx module for Hal (regardless the version)? Please let me know

Thanks
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 01, 2006, 11:50:16 pm
I wonder if moreis62 can send me any related software to my request. I would love to do some testing.  

Thanks

Title: ActiveX (oxc control for Hal)
Post by: spydaz on January 10, 2006, 06:03:02 am
Art, And ZabaFriends.

HI, I am always meditating on hal and AI. Just when you thought you were getting so close, you learn more.

So of my main aims with hal is Inteligence the gloss is the fun side. I am currently impressesed with hal6 as far as i have seen and read, i beleive finally we have a good AI here.

with the scripts and programming contributed by all of the members we have enough for all to design and build an ai from scratch for personal and buzinss use.

i would like to see all of the scripts displayed and saved in one place now as there are so many (no quibbles RE: working or non working).

As i had to learn all from the begining many new commers dont know where to start.

i have been confronted with so many DIFFERENT PROJECTS just sorting them out is hard. just to know which is superficial and which is logical.

Concluding that THE WAY HAL SAVES INFORMATION / RETREIVES THAT INFORMATION is the key. ASSOCIATING that information to have relevence is THE INTELIGENCE.

to have scienticfic knowledge /lists /dictionarys /recipies / conversion formules etc. this is hals functionality.


lately i have been watching robotic topics, some of these projects use the alice / hal interface as their AI engines.

hals true function will soon come in to play - as data mining is the key.... If hals INFORMATION STORAGE/RETREIVAL SYSTEM IS FULLY IN PLACE, is it not posible for you to send hal on FACTFINDING MISSIONS on the internet ie GO READ SOME WEB PAGES > based upon "SEARCH TOPIC" store in DB for later USE.... ie CHAT... or INFORMATIOn REQUEST.

Currently my IDEAS outweigh my talents so i must KEEP HUMBLE Learn more advanced coding techniques. as you say Script and code is for use by all, this is how i learnt to write code by reading somebody elses code, SO to HAVE IT ALL Centrally located WOULD BE like A MASSIVE HELP FILE.....


i have just come back online & built the MONSTER X2 64BIT SuPERpc, briancruncher now so i will be posting scripts soon....
(before all this script is taking too long to execute) probable quirk of program not machine!!!!
Title: ActiveX (oxc control for Hal)
Post by: spydaz on January 10, 2006, 06:17:21 am
AS mr M mention how to REFFERENCE the *.Dlls in your project...

this is the way that i add hal to my VB projects When required.
Then to acess the commands

HALBRAIN.<List of commands>

this is the only current way, I was going to install the macro media and experiment but since i have got in to my VB All that you may want to do could be accoumplished with vb EXCEPT placing hal onto YOUR WEB PAGE, as the dlls would also need to be up loaded and REGISTRD on the WEBSERVER REGISTRY.... With the activeX as long as th ocx is stored locally with the web page it is enough, this is the difference...

If you want to use hal o the website you can BUY WEBHAL or Get the FREE WEBHAL and Link him to your own site in a FRAME, and .....

this is why the macromedia did not detect the hal ACTIVEX.....

as Ishmal Says it may be possible to write a plugin in Vb6 containing the DLL files Refference by MR M. then REPACKAGING into an OCX... maybe, Hmm...Maybe not... at least that way you maybe able to reference your new activeX plugin in to you project...

BUT ALL ELSE FAILING you could try writing an ELIZA TYPE BRAIN for your project (this is nearly the same, LOWTEC) containing only the TOPICS WHICH you are dealing with..., this script is contained within the web page where she resides.(i used her in  one of my sites before, RAW, )
Title: ActiveX (oxc control for Hal)
Post by: Art on January 10, 2006, 05:16:57 pm
Leroy,

Glad to see you're back in true form. You have contributed a lot to the progression of Hal through your scripts, ideas and interactions.

Hal can only go forward from here and I agree that this databased version is the key to continued development.

For the most part, any limits of expansion are only due to us. Collective thinking, a place for script files, plug-in requests or ideas to enhance Hal's intellect would be most appreciated.

Tell me, do the lights in your flat dim when you power up your MONSTER X2 64BIT SuPERpc, braincruncher??
[^]
Title: ActiveX (oxc control for Hal)
Post by: Another Jim on January 10, 2006, 08:46:52 pm
Art,
Little doubt about that..........I can envision someone at the power station walking to a control panel and easing the lever upward to compensate for Leroy's monster computer coming online........(big smile)

Jim B
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 11, 2006, 05:22:23 am
Hi All,

Thanks for your ideas and contributions to this topic.

<<Ishmal Says it may be possible to write a plugin in Vb6 containing the DLL files Refference by MR M. then REPACKAGING into an OCX... >>

This OCX is what I am looking for many many months now. I hope that Mr.Medeksza will consider seriusly this request and we will see that in the near future. Meanwhile if another member manages to develop such OCX please contact me.

Thanks
Title: ActiveX (oxc control for Hal)
Post by: spydaz on January 11, 2006, 01:18:05 pm
i have intergrated the three dlls
HALBRAIN.dll / HALsmind.dll / halwn.dll.
but when you create the activeX control (no prob). remember that you still need to design an interface to go with...

also you still need to declare the objects and when you use the dlls they need to be kept local to the OCX file...

now you see while your doing that why not build the whole project as an activex & just stick it on the webpage i was suprised but it worked well... i used wthe webpage as a skin.... ms agent as char... the control was just an input output window... the activeX control contained all my brainDETECTIONS & most of the responses I used ACCESS as the DB....

one thing about the new HAL is it takes up less files... allcontained within 1 file(BETTER)the same with the activeX except the dbfile / although you dont have to use a dbfile. the elizaBrain principle is the same..... thats why i said to go back to the older versions of hal as you will see most of the brainwork is self contained in the script.

TRY IT AND SEE...
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 12, 2006, 06:51:32 am
Helloo Spydaz,

<<i was suprised but it worked well>>

So, did you manage to create this ocx? If yes please send it to me asap. I woulr really like to try it out. My email is idoumanis@yahoo.gr. Also please send me the example that you created as well (the web page). I will try them out and let you know back my feedback.

Looking forward for your reply

Thanks
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 12, 2006, 06:52:53 am
Sorry I posted twice the same thing.


Thanks [:)]
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 13, 2006, 03:19:05 pm
No news so far from spydaz. I hope that he is still out there......
Title: ActiveX (oxc control for Hal)
Post by: spydaz on January 15, 2006, 07:38:03 am
i have Just created the axtiveX ocx, BUT.....

You will still need the 3 MAIN DLLS. HALmind.dll halWN.dll HALBRAIN.dll.

also the brian programming will need to be done INSIDE the OCX.

as im still new to activex programming as the activeX ocx contains the SKIN to be used on the site and the link to the MSAGENT.

So when building the activeX plugin for your project you will need to edit the ActiveX (in visual basic)

im not sure this is what you want but here it goes I have mess around with various styles (this is the most basic)


(http://icon_paperclip.gif) Download Attachment: SpyAIControl.zip ("http://www.zabaware.com/forum/uploaded/spydaz/200611573638_SpyAIControl.zip")
24.87 KB
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 15, 2006, 08:17:55 am
Hi Spydaz,


Well, the VB project seems to run just fine. However, i can not locate the dll's needed nowehere in the HAL's folder. Are they perhaps part of the older HAl? Then although i registered the ocx correctly director does not seem to recognize it. Is it perhaps because it lacks of an actual interface?

Thanks
Title: ActiveX (oxc control for Hal)
Post by: aladyblond on January 15, 2006, 11:25:00 pm
i went to search on my pc and found halWN.dll and HALBRAIN.dll but i could not find HALmind.dll  so maybe someone can send it to you ~~alady
Title: ActiveX (oxc control for Hal)
Post by: wgb14 on January 18, 2006, 06:46:54 am
It seems that the required dll's are part of the old HAL. Spydaz if you are still out there can you please sent me the required dlls in my email as i no longer have the old HAL?

Thanks
Title: ActiveX (oxc control for Hal)
Post by: Dr.Benway on January 18, 2006, 12:28:35 pm
My dear Alady, if you have these files they will be found in the folder:

C:\windows\system32
Title: ActiveX (oxc control for Hal)
Post by: spydaz on January 18, 2006, 02:25:06 pm
Im Sorry, I forgot to mention, You will also need THE MSagent installed (probable hav already).. All located in the SYSTEM32 folder,
always Search for the files Via SEARCH in explorer.


THE HALBRAIN file is comprised of the three DLLs.

IE:halmind is the brain commands, HALWN is the wordnet


I am not REVERSE ENGINERRING the hal prog. was just using it in my own personal project, eventually you will not need any of the HAL dlls. when you anaylis which funtions & commands you are using try looking for simular things or THINK LOGICAL. I now do not use the dlls no more, my only loss is the wordnet.

although ive had many POINTERs in the right direction ive never found the activeX ocx for it...

MY personal AI HAS already INTERFACED to MSACCESS DB.... Long ago...

As my personal NLP-AI proj is a serious proj, hal is a fun proj..... i keep them seperate.