Zabaware Support Forums

Zabaware Forums => Ultra Hal Assistant File Sharing Area => Topic started by: Medeksza on October 01, 2003, 09:27:53 pm

Title: Programming Hal in Java and other languages
Post by: Medeksza on October 01, 2003, 09:27:53 pm
If there are any Java or C/C++ programmers out there, you may be interested in knowing that Hal not only runs as a VBScript, but can run as a JavaScript program as well. Attached to this post is a sample brain that shows how JavaScript can be used to program Hal.

Hal uses the Windows Scripting Host (WSH) to run any scripting language. Windows by default has VBScript and JavaScript. Many third party scripting engines exist also such as PerlScript ( http://www.activestate.com/Products/ActivePerl/ ) so Hal can be programmed in virtually any scripting language.


Download Attachment: (http://images/icon_paperclip.gif) javahal.uhp ("http://www.zabaware.com/forum/uploaded/Medeksza/2003101212726_javahal.uhp")
3.45 KB
Title: Programming Hal in Java and other languages
Post by: stephen on July 27, 2005, 10:40:23 pm
hello,i really like the java brain only i'm no programmer.is there any way i could experiment with java in the brain editor ?if not is there anyway i could get some one to help withj a script written in java?thanks
  stephen
Title: Programming Hal in Java and other languages
Post by: bitblaster on July 30, 2005, 08:57:30 pm
Thanks for this information... seems very interesting...

Assuming HaL was written in something other than visual basic, I am assuming C/C++, how come the brains do not use C# or some form of a C script?
Title: Re: Programming Hal in Java and other languages
Post by: d_vyn1 on October 26, 2010, 03:39:36 am
Thak you so much Mr M. This was exactly the info I was looking for. I'm a more comfortable with c++ but java is close enough. now how can I find a primer for aPI with objects functions and methods(read templates). I'm sure I can do what I want to do in VB Script but I'm way more comfortable with a c style script

Edit 1

Found the method protocols in the .mbr files

D_vyn1
d_vyn1@yahoo.com
Title: Re: Programming Hal in Java and other languages
Post by: betzelelgalut on January 01, 2011, 01:03:38 am
hello, is there any howto documents about converting a brain from vbscrip to another one? and will it still work with ultra hal? i was thinking about converting it to python as that is the language i am most familiar with.
Title: Re: Programming Hal in Java and other languages
Post by: onthecuttingedge2005 on February 23, 2011, 12:12:10 pm
If there are any Java or C/C++ programmers out there, you may be interested in knowing that Hal not only runs as a VBScript, but can run as a JavaScript program as well. Attached to this post is a sample brain that shows how JavaScript can be used to program Hal.

Hal uses the Windows Scripting Host (WSH) to run any scripting language. Windows by default has VBScript and JavaScript. Many third party scripting engines exist also such as PerlScript ( http://www.activestate.com/Products/ActivePerl/ ) so Hal can be programmed in virtually any scripting language.


<b>Download Attachment:</b> (http://images/icon_paperclip.gif) javahal.uhp (http://"http://www.zabaware.com/forum/uploaded/Medeksza/2003101212726_javahal.uhp")
3.45 KB

Hi Rob.

Quick Question.

Can the HAL engine cope with multi language programming in the form of plugins, what I mean is can plug-ins that are both Java and Vbscript and C++ coexist in the same brain cache without creating an error when assembled?

I would think it would be limited do to the;
//'Language=JavaScript
will it work using both
Rem Language=VBScript
in the same brain?

Jerry
Title: Re: Programming Hal in Java and other languages
Post by: Medeksza on February 23, 2011, 01:17:28 pm
The plug-ins and main brain script must be in the same scripting language for it to work. All the Ultra Hal Assistant program does is insert the plug-ins into the main script to create a new unique script and then it uses that. There is no way to mix languages within one script file.

And to answer the unanswered question from d_vyn1, Hal will support any language that can work with the windows script host (WSH) system. For a list of compatible languages see http://en.wikipedia.org/wiki/Windows_Script_Host#Available_Scripting_Engines  Python is listed there.
Title: Re: Programming Hal in Java and other languages
Post by: spydaz on February 23, 2011, 01:36:08 pm
I believe that your 100% there.... As The script control Loads the UHP brainfile into its memory to be evaluated ie "Resolve Getresponse" the beginning of the file

/'Type=Brain
//'Name=Example JavaScript Brain
//'Language=JavaScript
//'DataFolder=DefBrain
//


Specifies the Current language to Evaluate the Getresponse function "Technically could be Any Visual Programming Language" IE: C++ C# VB Java Foxpro... these are the languages that the script control recognizes...

Although it may be possible to make the brain Be Pure "Plugins" these plugins could be made in any language... C+.uhp C#.uhp But not in the SAME UHP!

A Python Script control would be needed to Add a Python script.... As Microsoft Programming languages do not yet recognize python and other 3rd party programming scripts as an evaluatable language yet
Title: Re: Programming Hal in Java and other languages
Post by: onthecuttingedge2005 on February 23, 2011, 02:51:03 pm
I think that clears thing up, thanks guys.

Jerry 8)
Title: Re: Programming Hal in Java and other languages
Post by: spydaz on February 24, 2011, 06:15:21 am
Opps my mistake "PYTHON" / IronPython is supported under the Scriptcontrol