Zabaware Support Forums

HalMenu.HalCommands

Started by tiger8u2, August 26, 2014, 10:43:24 PM

Previous topic - Next topic

tiger8u2

Hey all you knowledgeable programmers!

When scripting Hal, is there a difference between using these three different ways of calling a Hap file to play?

Version #1 I've seen used in scripts:

HalCommands = "<HAPFILE>Neutral.hap</HAPFILE>"
HalCommands = HalCommands

Version #2 I've seen used in scripts:

HalMenu.HalCommands = "<HAPFILE>Neutral.hap</HAPFILE>"

Version #3 I've seen used in scripts:

HalCommand = "<HAPFILE>Neutral.hap</HAPFILE>"

I guess it will work either way, I'd just like to be certain.  There is no information in either the Haptek help file or the Brain Edit help file about this particular command that I could find or I wouldn't be asking.

Thanks for the help in advance!   ;)

kryton

Hy, I can be corrected on this point but as far as I can tell, from using both type of HalCommands, the HalMenu command is used for automatic actions (I use this type of command in my auto start-up system).  The other command is used in general scripting.

kryton

Addition.

There was a list of HalCommands many years ago.  I have it but I don't know where from

Also Bill DeWitt did a list of plug-in ports, and there uses. (My copy says this is 6 years and 4 months old but it was a sort of screen grab so it is probably even more old now.)  The list is said to be a PBworks release.

All this comes off a very old, and venerated laptop that has lost most of its external functions.

kryton

Addition 2

The Bill DeWitt list can be accessed by typing HalCommands into your Internet open page and then looking down for the PBworks entry.

tiger8u2

Wow!  Talk about letting the genie out of the bottle!  Thanks krypton!

Here's the link if anyone else wants to get a brain full of ideas:  http://ultrahalscript.pbworks.com/w/page/11906966/FrontPage

kryton

Krypton!

Isn't that where Superman comes from?

tiger8u2

Snap, sorry kryton, this new laptop has a native resolution that makes it hard for these old eyes to see.

kryton

One of the things that makes HalCommands a problem to use is the fact that you can only use a particular command once in a sequence of scripting.  A fairly simple way out of this is to use a HalCommand to go to a Hap file and then activate other instruction from the Hap.  Even another Hap.

Just a thought.

freddy888

Not sure if that's right sorry.

For example you used to be able to do this :

HalCommands = HalCommands & "<HAPTEXT>My extra Haptek command</HAPTEXT>"

tiger8u2

Thanks for the tips guys.  I'll be testing all of them as I go along.  The HalMenu.HalCommand is used in the loneliness plug-in and I assume its supposed to generate the animation but I don't think it does.

kryton

Hy all,

Freddy888 thanks a lot for your input.  I stand (Or rather sit) corrected.  You can use this idea to double-up (Or possibly more) HalCommands. Thanks again it has brought new openings to my scripting.  ("used to" does it work for me because I run my Hal in WindowsXP?)


freddy888

Glad it helped. I just mean 'used to' because it's been a while since I did any scripting in UltraHal.

DemonRaven

The programming on the link posted http://ultrahalscript.pbworks.com/w/page/11906966/FrontPage is seven years old is it still valid? IF not is there a tutorial on programming the hal brain? I have also noticed that the save function on the hal brain seems to be disabled.

onthecuttingedge2005

Quote from: tiger8u2 on August 26, 2014, 10:43:24 PM
Hey all you knowledgeable programmers!

When scripting Hal, is there a difference between using these three different ways of calling a Hap file to play?

Version #1 I've seen used in scripts:

HalCommands = "<HAPFILE>Neutral.hap</HAPFILE>"
HalCommands = HalCommands

Version #2 I've seen used in scripts:

HalMenu.HalCommands = "<HAPFILE>Neutral.hap</HAPFILE>"

Version #3 I've seen used in scripts:

HalCommand = "<HAPFILE>Neutral.hap</HAPFILE>"

I guess it will work either way, I'd just like to be certain.  There is no information in either the Haptek help file or the Brain Edit help file about this particular command that I could find or I wouldn't be asking.

Thanks for the help in advance!   ;)

using HalCommand = HalCommand  & <HAPFILE>Neutral.hap</HAPFILE>" allows more than one HaCommand to run at same time....

Art

Quote from: DemonRaven on November 30, 2014, 05:44:27 PM
The programming on the link posted http://ultrahalscript.pbworks.com/w/page/11906966/FrontPage is seven years old is it still valid? IF not is there a tutorial on programming the hal brain? I have also noticed that the save function on the hal brain seems to be disabled.

They are for the Hal 6.x and are valid AFAIK.
This is an excellent resource for any / all Hal users who wish to get more from their Hal.
In the world of AI it's the thought that counts!

- Art -