Author Topic: How do the new "plugin.exe" routines work?  (Read 4674 times)

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
How do the new "plugin.exe" routines work?
« on: February 25, 2006, 11:24:58 am »
Ok, I guess I am just real old school. I am so use to either writing a "named of file.brn" or cuting and pasting (at least I admit it..hehe) directly into a Hal "xxx.uhp" that I am not familar with how this new "plugin filename.exe" function works and how it populates itself in the General Options menu in the new Hal. I'm sure this is a rather basic stuff kinda question but somehow I bet I am not the only one who is not in the know.
I am sure it is, but how is this more efficient than the old sometimes trial and error way of finding the best placement for a new routine in a Brain script? How are adjustable levels that show up in the General Options menu created and set since I am now not placing them and their variables directly into a Hal Brain manually?
A sample/example would be nice [:D]
Thanks!
Ponn

One Person can summon the future...

onthecuttingedge2005

  • Guest
How do the new "plugin.exe" routines work?
« Reply #1 on: February 25, 2006, 01:11:28 pm »
Hi Ponnfar.

quote:


Ok, I guess I am just real old school. I am so use to either writing a "named of file.brn" or cuting and pasting (at least I admit it..hehe) directly into a Hal "xxx.uhp" that I am not familar with how this new "plugin filename.exe" function works and how it populates itself in the General Options menu in the new Hal.




The best place to explain what happens when HAL caches all the plug-ins is in the HalScript.dbg in the Ultra Hal 6 Assistant folder.

The HalScript.dbg will explain how plug-ins get cached together to form one working brain.

The Actual HAL6.uhp isn't the actual brain that's calling shots anymore, it is the cached Plug-ins/Brain together, I don't know if the actual call is coming from the HalScript.dbg or if it is just for debugging purposes but it is a code assembly file.

The plugin filename.exe are just installers that place a .uhp file into the correct folder so that it will appear in HAL's option panel.

quote:


I'm sure this is a rather basic stuff kinda question but somehow I bet I am not the only one who is not in the know.




Always happy to help.

quote:


I am sure it is, but how is this more efficient than the old sometimes trial and error way of finding the best placement for a new routine in a Brain script?




The HAL 6 plug-in method was designed to make it easy for beginners to enter in scripts, some people would rather not learn coding so this feature just gives them an advantage without taking chances of copy and paste insertions.

quote:


How are adjustable levels that show up in the General Options menu created and set since I am now not placing them and their variables directly into a Hal Brain manually?




The Plug-in variables are Sub codes that are called by HAL's option Panel, Variables can be coded within the Sub and used in script under the Sub so that values are used that the Sub created by the interaction of the User in HAl's option panel.

'Help
    lblPlugin(0).Caption = "Happy.hap Expression Control"
    lblPlugin(0).Move 120, 10, 3300, 1000
    lblPlugin(0).WordWrap = True
    lblPlugin(0).Visible = True
    cmdPlugin(0).Move 120, 250, 850, 300
    cmdPlugin(0).Caption = "Help"
    cmdPlugin(0).Visible = True

Examples:

'Help
    'A LABLE PLUG-IN = lblPlugin
    'THIS LABLE PLUG-IN ALLOWS A CAPTION OF THE PLUG-IN TO BE PLACED.
    lblPlugin(0).Caption = "Happy.hap Expression Control"
   
    'THIS LABLE PLUGIN ALLOWS COORDINATES OF THE CAPTION ON HALS   PANEL.
    lblPlugin(0).Move 120, 10, 3300, 1000
   
    'THIS LABLE PLUG-IN ALLOWS WORD WRAP OF THE CAPTION TO BE TRUE OR FALSE, IF TRUE THE CAPTION WILL RETURN AFTER A CERTAIN CHARACTER LENGTH, IF FALSE THEN THE CAPTION WILL HAVE NO RETURN CHARACTER LENGTH.
    lblPlugin(0).WordWrap = True

'THIS LABLE PLUG-IN ALLOWS THE CAPTION TO BE VISIBLE IN HAL'S OPTION PANEL IF IT IS SET TO TRUE.
    lblPlugin(0).Visible = True

    'A COMMAND PLUG-IN = cmdPlugin
'THIS COMMAND PLUGIN ALLOWS COORDINATES OF THE BELOW HELP BUTTON ON HALS PANEL.

    cmdPlugin(0).Move 120, 250, 850, 300

'THIS COMMAND PLUG-IN DISPLAYS WHAT THE CAPTION ON THE BUTTON WILL SAY.
    cmdPlugin(0).Caption = "Help"

'THIS COMMAND PLUG-IN ALLOWS THE BUTTON TO BE VISIBLE IF SET TO TRUE.
    cmdPlugin(0).Visible = True

Jerry[8D]
« Last Edit: February 25, 2006, 01:15:24 pm by onthecuttingedge2005 »

GamerThom

  • Sr. Member
  • ****
  • Posts: 408
    • View Profile
    • http://www.charctercreationsanddesignworks.us/index.html
How do the new "plugin.exe" routines work?
« Reply #2 on: February 25, 2006, 01:12:34 pm »
[:)] You're not alone on this Ponn. It has me a
little curious as well. I've been cutting and
pasting extra files and merging them into Hal6.
If there was an example of how the new sysem works
it might make things easier (less messy).

Live Long and Prosper - Ponn.

Thanks "edge".[:)]
« Last Edit: February 25, 2006, 01:14:36 pm by GamerThom »
Gamer-T

Scratch

  • Jr. Member
  • **
  • Posts: 59
    • View Profile
How do the new "plugin.exe" routines work?
« Reply #3 on: February 25, 2006, 03:36:44 pm »
I think the trial and error method is still in effect for placement within the script. It's just that with the new plug in system you now control the placement by choosing which plug-in area to use with the  Rem PLUGIN: PLUGINAREA#. The plugin will insert its code into whichever area you name. If you look in the script, you can see the "REM PLUGIN" placeholders scattered around.
I was surprised at how much code it takes to put adjustable levels in the options panel! In addition to what OTC said, you have to create tables to store the settings in, and read from those tables on startup to restore the settings. I studied the plugins Vrossi made, as well as the default plugins, to "learn" (ie cut & paste!) how to do it[:)]
 

Ponnfar

  • Full Member
  • ***
  • Posts: 149
    • View Profile
    • http://zabaware.com
How do the new "plugin.exe" routines work?
« Reply #4 on: February 25, 2006, 11:01:31 pm »
Jerry, I knew I could count on you. Thanks for pointing me in the right direction so well. [:D]
Ponn
One Person can summon the future...

freddy888

  • Hero Member
  • *****
  • Posts: 1693
    • View Profile
    • AiDreams
How do the new "plugin.exe" routines work?
« Reply #5 on: February 26, 2006, 04:24:14 pm »
Thanks from me too that gives me a good pointer on Hal 6 when I get myself some time.  It always pays to keep watching this forum :) thanks people.

Charmzbond

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
How do the new "plugin.exe" routines work?
« Reply #6 on: March 05, 2006, 04:46:04 am »
Most of the files currently being shared are unable to produce the
.uhp files needed to install the plugins in the option's panel.
So far the websurf.zip and the loneliness4.zip were the only ones that succeeded in creating .uhp files...i.e. websurf.uhp It seems like executing the .exe files most of the time does not create any .uhp files. How then, are we supposed to install these wonderful plugins?
 

onthecuttingedge2005

  • Guest
How do the new "plugin.exe" routines work?
« Reply #7 on: March 05, 2006, 08:16:47 pm »
quote:
Originally posted by Charmzbond

Most of the files currently being shared are unable to produce the
.uhp files needed to install the plugins in the option's panel.
So far the websurf.zip and the loneliness4.zip were the only ones that succeeded in creating .uhp files...i.e. websurf.uhp It seems like executing the .exe files most of the time does not create any .uhp files. How then, are we supposed to install these wonderful plugins?



The Plug-in .exe's that I make will install the .uhp to the
C:\Program Files\Zabaware\Ultra Hal Assistant 6 folder

You will have to run the exe to unzip the .uhp to the folder, The directory is already set for the unzip program within the exe so beginners don't have to figure out what folder the .uhp files are supposed to go in.

The Name of the Plug-in might not be the same in the plug-in panel
as the name of the file itself that places it there.

The WebSurf.uhp and the code inside it refers to
Rem Name=Web Surfer
in this case the file name and the plug-in name are similar but might not be the case in other plug-ins made.

Jerry[8D]