An application script isn't much different from "regular"
scripts
but it will
take for granted that you follow a few definitions and rules and this
way have enough conditions that are used by all compatible projects
On this chapter you can read more about the
available application
functions and also find a quick guide.
Let's study a script
example
right now and start explaining how it works.
[main] Title=Sudoku Description=The popular
number game Level=5
[process] Add_Shortcut,Desktop Add_Shortcut,AutoStart Add_Shortcut,StartMenu,Games
and Fun unpack
As you may notice - very few lines are needed, also note that this
script is composed by 3
script sections:
Main
Variables
Process
Settings on the [Main]
section
More
settings in this section can be added but
only Title,
Description
and Level
are needed as a minimum.
Since this
script is meant to add programs you need to use Level=5 value
to group it with other similar scripts
Settings in
the [variables] section
%ProgramTitle% - Used as title for the created
shortcuts
%ProgramEXE% - The executable file that
should be launched when clicking on shortcut (no paths required, only
filename)
%ProgramFolder% -
The name of the folder where all files should be placed
More
details about the variables section
%ProgramTitle%
is the title of this program and we can use any description as desired,
no need to be directly related to the exe or folder.
%ProgramEXE%
stands for Program Executable and is used as the target application
that is launched when clicking on the respective shortcut (if created),
it can also be used to launch any other files besides executables like
text files, html pages, bat files, etc.
%ProgramFolder%
is the folder name where all files inside the script will be placed.
You only need to add the folder name you wish to use, there's no need
to add the full path.
Settings in
the [process] section
This is the section that is executed when running the
script so it's where we should place our functions.
Let's list and explain each one of the available functions:
Add_Shortcut,Desktop
- This function will add a shortcut on the desktop
Add_Shortcut,AutoStart-
Mark your program to be included on the group of programs that runs on
start up.
Add_Shortcut,StartMenu,Games and
Fun - In
this example you can add a shortcut on the start menu, notice that
applying the aditional parameter as "Games and Fun" will place your
shortcut inside a folder on the start menu with this name.
unpack- A very important function
because it will do most of the hard work of adding the needed
files to your project.
How does
unpack work?
Very simple, just add all your files meant to be "unpacked"
inside your script.
By default all these files should be located on an
archive called "Folder"
For
this task you can use the tools found inside WinBuilder or use
some of
applications created for this purpose like "MakeScript" or
"H7PluginBuilder".
Look under the script syntax page for more details on how
to edit scripts and add files.
More details about unpack
This script concept works very well when all program
files are
included inside the same script. This also means that preference is
given exclusively to freeware and open source programs that can be
distributed on the internet with proper legal authorization.
Shareware can also be included in this
category since the first
term "share" implies that we can share the software - but please
remember that in all software whenever appliable - your personal serial
keys/data and product activation tools cannot be included
under any circunstance.
Frequently Asked Questions
Q:How is this script used after
all? A: It is
used to add simple programs and tools on your project in a quick and
simple manner. Q:What can be considered as
"simple programs"? A: In this
category should be
considered programs labeled as "standalone" and "portable" - which use
very few files and registry settings. Also note that any program under
this category should also be prepared to work under
all available
projects that support this method. Q:Well, I need a special icon
different than the one used by the script - how can I do it? A: Don't use
this generic script for these cases, read the chapter about exceptions
and
how to handle them in your scripts Q:I want to use a
script
to add notepad on the windows directory instead of the programs folder,
why can't these functions support this? A: This is
a specific feature that should be handled as an exception, you
shouldn't
use this method for these cases. Q:How can we add more
functions to the application scripts? A: You will
need to suggest and
discuss them on the respective discussion topic, in most cases do
remember to ask functions that can also provided by other projects to
make them globally available
Q:Can I use this method
and
the project specific way to create these scripts together? A: Yes you
can, but it is not
adviced. Both methods can work well together but should be kept in
separate
scripts. A script that was written with this common method should avoid
using
methods specific to
a particular type of project.
Q:Where can these
scripts be found or identified? A: They can
be included either
inside your projects mixed with other scripts or you can find them in
the
download section of the community forums under the Application
scripts
category. We are also discussing a common folder where all
these generic scripts could be placed but it's still in development.
Q:Is this method perfect? A: No way!
But we hope that
this is a good method to create scripts that can work
on most
projects available at this moment and even on the ones to come in the
future. This way we ensure that your favourite project can use as many
available scripts as possible within the next years
without having
to rewrite or edit anything - making it easier for you to find more
available programs.
Bugs and
Exceptions
Since this method uses predefined functions
based on the specific project construction, there are usually no bugs
to be reported directly because of
the used functions.
You should look on the discussion forums for
assistance in case
you find a script that doesn't work as you expected so that the
community can properly view it and suggest other alternative
ways to solve exceptions.
Log
of changes
Inside each supported project you find a file called api.script which
contains the complete log of changes. You can always download the
latest versions of this file using the download center.
Please
let us know
if this page is not complete or if you still haven't found needed
information.