PDA

View Full Version : question about custom functions



NewsArchive
02-10-2008, 03:05 AM
Hi All,

I see there is a "Custom" button over on the script function bar and I'm
assuming that is for custom functions. However, I am apparently blind
becuase I see no method of creating functions. If someone could "show me
the light" I would appreciate it.

BTW, this is the easiest setup bulding software I've ever encounter... with
the amount of power and flexibility it has.

Cheers!
Ken

NewsArchive
02-10-2008, 03:06 AM
Hi Ken,

In the Script Editor, the Standard view displays a list of all available
functions and the Custom view displays your customized list of functions.

To customize the List of Functions:

1. To add a new function to the Custom Function List, in the Standard view
select a function and right-click. Select Add to Custom List.

2. To remove a function from the Custom Function List, in the Custom view
select the function and right-click. Select Remove from Custom List.

Does this help?

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner

NewsArchive
02-10-2008, 03:06 AM
Thanks for the response Friedrich. Apparently I'm begin a little dumb here,
however, I'm I correct that you really can't create a true custom function?

I can select any function and add it to the custom list, however, what I'm
really looking for is to write a function such as,

function findOldFiles( sPath string ) : integer {

// code to perform

}


And then from the script code I can call this function and test the
result... or something like this.

Any suggestions?

Cheers!
ken

NewsArchive
02-10-2008, 03:07 AM
Hi Ken,

> Thanks for the response Friedrich. Apparently I'm begin a little dumb
> here, however, I'm I correct that you really can't create a true custom
> function?
>
> I can select any function and add it to the custom list, however, what I'm
> really looking for is to write a function such as,
>
> function findOldFiles( sPath string ) : integer {
>
> // code to perform
>
> }
>
>
> And then from the script code I can call this function and test the
> result... or something like this.
>
> Any suggestions?

You can use the #include compiler script item to create libraries of
commonly used sections of installation scripts. These can easily be included
in installations that require these functions.

Does this help?

Friedrich

NewsArchive
02-10-2008, 03:07 AM
Thanks Friedrich,

Yes that helps explain it. Basically the code we are calling can happen
in a linear fashion so if we need anything above that I can write a dll
or run a vbscript for additional functionality. Although at this point
I have found any functions setupbuilder hasn't been able to accomplish
through built-in stuff.

Cheers!
Ken

NewsArchive
02-10-2008, 03:08 AM
Although SetupBuilder's versatility may sometimes lead us to forget this...
it's a scripting language, not a language language. As with DOS batch files
or AFAIK VBS scripts, you need to work with the commands that the processor
knows how to translate.

For truly custom functions, create them in your own DLL in whatever language
you choose and include it as a support file with your installer.

Jane

NewsArchive
02-10-2008, 03:09 AM
Thanks Jane. I'm starting to get the hang of it. :)

Cheers!
ken

NewsArchive
02-10-2008, 03:11 AM
> BTW, this is the easiest setup bulding software I've ever encounter...
> with the amount of power and flexibility it has.

Thank you so much, Ken!

Friedrich

--
Friedrich Linder
Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 6.7
Create Windows Vista ready installations in minutes

-- Official Comodo Code Signing and SSL Certificate Partner