Author Topic: HalMenu.HalCommands  (Read 17265 times)

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
HalMenu.HalCommands
« 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!   ;)
« Last Edit: August 26, 2014, 11:02:24 pm by tiger8u2 »

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: HalMenu.HalCommands
« Reply #1 on: September 13, 2014, 07:25:40 am »
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

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: HalMenu.HalCommands
« Reply #2 on: September 13, 2014, 08:13:07 am »
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

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: HalMenu.HalCommands
« Reply #3 on: September 13, 2014, 08:20:01 am »
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

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: HalMenu.HalCommands
« Reply #4 on: September 13, 2014, 04:09:17 pm »
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

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: HalMenu.HalCommands
« Reply #5 on: September 16, 2014, 04:15:47 pm »
Krypton!

Isn't that where Superman comes from?

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: HalMenu.HalCommands
« Reply #6 on: September 16, 2014, 08:26:21 pm »
Snap, sorry kryton, this new laptop has a native resolution that makes it hard for these old eyes to see.

kryton

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: HalMenu.HalCommands
« Reply #7 on: September 19, 2014, 05:54:45 pm »
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

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Re: HalMenu.HalCommands
« Reply #8 on: September 19, 2014, 06:08:33 pm »
Not sure if that's right sorry.

For example you used to be able to do this :

Code: [Select]
HalCommands = HalCommands & "<HAPTEXT>My extra Haptek command</HAPTEXT>"

tiger8u2

  • Full Member
  • ***
  • Posts: 190
  • Eat'em and Smile!
    • View Profile
Re: HalMenu.HalCommands
« Reply #9 on: September 22, 2014, 12:28:33 am »
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

  • Full Member
  • ***
  • Posts: 135
    • View Profile
Re: HalMenu.HalCommands
« Reply #10 on: October 04, 2014, 11:02:30 am »
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

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
Re: HalMenu.HalCommands
« Reply #11 on: October 04, 2014, 11:31:53 am »
Glad it helped. I just mean 'used to' because it's been a while since I did any scripting in UltraHal.

DemonRaven

  • Full Member
  • ***
  • Posts: 111
    • View Profile
    • chatbotfriends
Re: HalMenu.HalCommands
« Reply #12 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.

onthecuttingedge2005

  • Guest
Re: HalMenu.HalCommands
« Reply #13 on: December 01, 2014, 12:48:13 am »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3848
    • View Profile
Re: HalMenu.HalCommands
« Reply #14 on: December 01, 2014, 05:11:41 am »
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 -