Author Topic: List of Hal Commands  (Read 9378 times)

onthecuttingedge2005

  • Guest
List of Hal Commands
« on: June 03, 2007, 11:09:14 am »
Hi Rob.

could you give us an update of the full HalCommands in one big list?

Thanks
Jerry[8D]

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
List of Hal Commands
« Reply #1 on: June 03, 2007, 11:16:35 am »
quote:
Originally posted by onthecuttingedge2005
could you give us an update of the full HalCommands in one big list?


I second that.


Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
List of Hal Commands
« Reply #2 on: June 03, 2007, 08:48:08 pm »
Here is a list of all Hal commands. Hal commands can be executed from Hal's brain script using Script_Load, HalResponse, or GetResponse. It can also be executed using the command line options of Hal's shortcut. And new in Hal 6.1 they can be run by sending a message from a different program directly to hal's window handle, as in this example VB6 program:

Download Attachment: HalCommandSender.zip
6.6 KB

Code: [Select]
<SHOWHAL>
<HIDEHAL>
<SHOWCAL>
<SHOWEVENTS>
<SHOWOPTIONS>
<MICOFF>
<MICON>
<MICTOGGLE>
<VIEWCHAT>
<AUTO>miliseconds</AUTO>
<AUTOOFF>
<HALPAD>
<HALPAD>file-path</HALPAD>
<VOICE>new voice</VOICE>
<SPEAK>Text to speak</SPEAK>
<DIAL>Phone</DIAL>
<HAPBACK>jpeg path</HAPBACK>
<AGENTXY>X,Y</AGENTXY>
<MSAGENT>Anim name</MSAGENT>
<HAPFILE>Hap file</HAPFILE>
<HAPTEXT>Hap text</HAPTEXT>
<RUNPROG>Prog name</RUNPROG>
<RESPOND>User sent</RESPOND>
<CUSERNAME>New user name</CUSERNAME>
<CHALNAME>New Hal Name</CHALNAME>
<RUNCMD>1 line of VBScript</RUNCMD>
Robert Medeksza

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
List of Hal Commands
« Reply #3 on: June 03, 2007, 08:52:49 pm »
quote:
Originally posted by Medeksza
It can also be executed using the command line options of Hal's shortcut.

Ah... so we can do a command line microphone switch. I'll have to try that.

Thanks Robert! This is very helpful!


Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
List of Hal Commands
« Reply #4 on: June 03, 2007, 08:54:30 pm »
quote:
Originally posted by Medeksza
<RUNCMD>1 line of VBScript</RUNCMD>



Ooo... I remember seeing a competition for the most cool things you could do with one line of script. This should be fun!


Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
List of Hal Commands
« Reply #5 on: June 03, 2007, 09:20:21 pm »
Heh...

<runcmd>MsgBox("one"),MsgBox("two")</runcmd>

Runs them backwards... But this means much can be done that was difficult or impossible before.

Unless this was always there and I didn't know it...


onthecuttingedge2005

  • Guest
List of Hal Commands
« Reply #6 on: June 03, 2007, 10:03:49 pm »
Hi Rob.

Thanks so much for the update.

I have an issue that may need to be addressed for any future HAL versions.

I try to run this script:

Code: [Select]
Rem PLUGIN: SCRIPT_LOAD

HalMenu.HalCommand "<SHOWHAL>"

If HalMenu.HalCommand("<SHOWHAL>") = True Then
HalCommands = "<MICON>"
End If

I have tried to make a plugin that allows the microphone to turn on by default when HAL starts along with it's GUI Chat window at start up.

issues:

when HAL starts up, the HalAsst.exe and processing like: load database etc and the HalCommands = "<SHOWHAL>" I wrote conflict with each other.

when this happens, the script and the loading 'hangs', although HAL's GUI chat window pops up, the microphone will not turn on at start up.

is there a solution to this?

Jerry[8D]
« Last Edit: June 03, 2007, 11:55:58 pm by onthecuttingedge2005 »

onthecuttingedge2005

  • Guest
List of Hal Commands
« Reply #7 on: June 03, 2007, 10:05:22 pm »
quote:
Originally posted by Bill DeWitt



Unless this was always there and I didn't know it...



It's been there quite awhile bill, since HAL 5 that I recall maybe even HAL 4 but even I can't recall if HAL 4 had it, it's been along time since I played with HAL 4 and I haven't had HAL full addition  of HAL 4 installed onto this computer for quite some time.

Jerry[8D]
« Last Edit: June 03, 2007, 10:21:36 pm by onthecuttingedge2005 »

Bill DeWitt

  • Hero Member
  • *****
  • Posts: 650
    • View Profile
List of Hal Commands
« Reply #8 on: June 03, 2007, 10:28:48 pm »
<grump> I can't get command line options to work with HalCommands </grump>
Too many possible ways for me to keep messing around so I have to ask, how would you use these in the command line of a shortcut to Hal?

Edit: I got this to work...

"C:Program FilesabawareUltra Hal Assistant 6HalAsst.exe" HalCommands="<SHOWHAL>"

But couldn't get this to work...

"C:Program FilesabawareUltra Hal Assistant 6HalAsst.exe" HalCommands="<SHOWHAL>"&"<MICON>"

or...

"C:Program FilesabawareUltra Hal Assistant 6HalAsst.exe" -HalCommands="<SHOWHAL>" -HalCommands="<MICON>"

« Last Edit: June 03, 2007, 11:23:41 pm by Bill DeWitt »


onthecuttingedge2005

  • Guest
List of Hal Commands
« Reply #9 on: June 03, 2007, 11:47:39 pm »
quote:
Originally posted by Bill DeWitt

<grump> I can't get command line options to work with HalCommands </grump>
Too many possible ways for me to keep messing around so I have to ask, how would you use these in the command line of a shortcut to Hal?

Edit: I got this to work...

"C:Program FilesabawareUltra Hal Assistant 6HalAsst.exe" HalCommands="<SHOWHAL>"

But couldn't get this to work...

"C:Program FilesabawareUltra Hal Assistant 6HalAsst.exe" HalCommands="<SHOWHAL>"&"<MICON>"

or...

"C:Program FilesabawareUltra Hal Assistant 6HalAsst.exe" -HalCommands="<SHOWHAL>" -HalCommands="<MICON>"





Hi Bill.

If you want the back slashes to work for directories then use double back slashes because the Zabaware filter will filter out single back slashes, this is a security issue with Zabaware's server.

I have tried quite a few different methods to getting HAL to bring up the GUI chat panel and turn on the microphone only to have issues.

I am about ready to move on to new plugins just to keep me from being frustrated with this one.

Jerry[8D]
« Last Edit: June 04, 2007, 12:34:27 am by onthecuttingedge2005 »

Medeksza

  • Administrator
  • Hero Member
  • *****
  • Posts: 1469
    • View Profile
    • http://www.zabaware.com
List of Hal Commands
« Reply #10 on: June 04, 2007, 11:58:28 am »
Unfortunetely <SHOWHAL> is an asynchonous call. It does not wait for Hal's window to finish loading before it runs the next command. And <MICON> requires Hal's window to be completely loaded in order to actually turn the microphone on. Giving the command <SHOWHAL><MICON> at the same time will not turn on the mic since Hal's window doesn't have enough time to load before it tries to turn the mic on.

One solution that I can think of would be to run <SHOWHAL> at startup and <MICON> at some point in the future like maybe in the minute timer. Another possibility worth looking into may be <RESPOND>Turn on the Mic</RESPOND> and you would have to program the Hal Brain to turn on the mic when it receives that command. In theory, the <RESPOND> command will load Hal's window, wait for it to load, and then give that query for Hal to respond to, at which point a <MICON> command could be given to turn the mic on.

Also, command line options for Hal don't need a HalCommands= or anything like that. Just straight HalCommand tags should work fine.
Robert Medeksza

onthecuttingedge2005

  • Guest
List of Hal Commands
« Reply #11 on: June 04, 2007, 03:54:08 pm »
quote:
Originally posted by Medeksza

Unfortunetely <SHOWHAL> is an asynchonous call. It does not wait for Hal's window to finish loading before it runs the next command. And <MICON> requires Hal's window to be completely loaded in order to actually turn the microphone on. Giving the command <SHOWHAL><MICON> at the same time will not turn on the mic since Hal's window doesn't have enough time to load before it tries to turn the mic on.

One solution that I can think of would be to run <SHOWHAL> at startup and <MICON> at some point in the future like maybe in the minute timer. Another possibility worth looking into may be <RESPOND>Turn on the Mic</RESPOND> and you would have to program the Hal Brain to turn on the mic when it receives that command. In theory, the <RESPOND> command will load Hal's window, wait for it to load, and then give that query for Hal to respond to, at which point a <MICON> command could be given to turn the mic on.

Also, command line options for Hal don't need a HalCommands= or anything like that. Just straight HalCommand tags should work fine.



Hi Rob.

Your awesome!

Thanks buddy!
Jerry[8D]
« Last Edit: June 04, 2007, 03:54:52 pm by onthecuttingedge2005 »

Bill819

  • Hero Member
  • *****
  • Posts: 1483
    • View Profile
List of Hal Commands
« Reply #12 on: June 05, 2007, 09:19:09 pm »
Thanks Robert for the list. I was both supprised and pleased to see the same commands that were available for Hal 5. That means that all the things that I had programmed Hal to do can now be implemented with Hal 6. Not sure when I'll have the time but will be resurrecting a bunch of old features.
Gerald, I still have a working copy of Hal 4 or 4.5 on my hard disk.
I am also able to run either 5 or 6 as they exist in different directories.
Bill