Re: GnuB needs Script-Fu Sensei

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday, September 06, 2008 10:34 AM, "Rob Antonishen" 
<rob.antonishen@xxxxxxxxx> wrote;
> Glad something helped :)
>
> I thought your first question was whether it was an array of x/y lists
> or an array of values. Either way, glad you worked it out.
>
> Rob A.

Well, I'm awake again, and ready for more lessons at the feet of my 
Script-Fu Sensei. This time my humble questions focus on the 
"script-fu-register" procedure.

1. _"Underscores and Strings": In some scripts I see underscores immediately 
preceding string parameters in this procedure. The ones inside the strings 
are easier to understand (they denote highlighted letters used as hotkeys, 
right?). What purpose do the ones *before* the strings serve?

2. The online manual describes the second parameter as "The location in the 
menu where the script will be inserted. The exact location of the script is 
specified like a path in Unix, with the root of the path being either 
toolbox or right-click." However the example script seems to contradict 
this, using this parameter as the procedure's menu option label while 
registering its menu option path with an entirely different function 
(script-fu-menu-register). Could you explain this please? Is the 
(presumably) older documented method deprecated, and if so should I modify 
any older scripts using it? Are there any conventions or guidelines as to 
which menus I should link my new scripts to? Can (and should) I link my 
procedures to more than one menu?

3. While the example script shows only constant parameter default values 
being used, "The Script-Fu parameter API" table < 
http://docs.gimp.org/en/gimp-using-script-fu-tutorial-first-script.html#gimp-using-script-fu-api > 
"SF-FILENAME" entry example shows a string function and a program defined 
variable being used [(string-append "" gimp-data-directory 
"/scripts/beavis.jpg")]. Are these values only updated when the PDB is 
refreshed, or does the API evaluate them from the script-fu-register 
description when a menu option is called? (If the latter, I could set some 
parameter defaults to current program values.)

4. At the bottom of "The Script-Fu parameter API" table, an SF-ENUM 
parameter type is described which creates "a combo-box showing all enum 
values for the given enum type. This has to be the name of a registered 
enum, without the "Gimp" prefix. The second parameter speficies the default 
value, using the enum value's nick." My learned (if humble) response to this 
information was "Huh?" This SOUNDS like a very useful parameter type, but a 
lot of information is missing. Where can I find a list of these "enum types" 
and their values?

As maybe you can tell I was a programmer in another life, so I am finding 
the possibilities of Scheme and Script-Fu endlessly fascinating. I anxiously 
(and humbly) wait for your pearls of wisdom to enlighten me.

-- 

Dalton "who wishes he didn't have *quite* so much to be humble about" Spence 


[Index of Archives]     [Gimp Developers]     [Gimp Users]     [Yosemite News]     [Epson Inkjet Printers]     [Scanners]     [Gimp's Home]     [Steve's Art]

&hbsp; Powered by Linux