Session Files
By default, WebWinds generates a set of commands that reflect the actions
performed by the user. These commands have the form of a postscript-like
language called pSlang and pronounced 'slang'. The commands are saved in
files called 'sessionx.slang' where x is a number. Up to
4 (this is configurable by modifying config.slang)
such files can exist at one time with older files being deleted when new
ones are created each time WebWinds is run. If a user would like to save
a session once it is complete, the 'sessionx.slang' file must be
renamed. If, for example, the file is renamed 'rerun.slang', the session
can be rerun using the '-i' option ( -i
rerun.slang) as described in the configuration
documentation. These session files can also be run from the "Rerun"
menu under "Utilities" on the Desktop. The user
should keep in mind that this menu is 'static', i.e. it is not updated
when session files are added or names are changed. This means that
in order to rerun a session, it is necessary to quit the session and restart
WebWinds. Session files can be run on other machines as long as all files
accessed in the session are available, for example, in the paths defined
by paths.txt. Also, the portion of the 'datamanager.txt'
file used in the session must be the same on both machines. Thus, if you
would like help debugging a problem, save the 'session.slang' file as,
e.g. 'myproblem.slang' and make it (as well as your datafile)
available to us.
As an aid to running some sample sessions
included with the package, several session files have been included with
the distribution. For an example of how to access and use IRAS data, see
the IRAS example. It has a
link to a session file. For an example of how to access thermal infrared
data of the earth's surface, download the session file indicated in the
ASTER
example.
This re-run capability allows a data provider to supply users with both
data files and recipes for analyzing the data via pre-configured sessions.
This can easily be done on a Website. For an example of how this might
work, first you need to configure your web browser
so that it recognizes '.slang' files. Then try downloading
viking.slang,
iras.slang
or (for fast links) aster.slang.
These sessions have been configured to use data on the Web so you don't
need to download data beforehand.
If you create a session file and want to make it available to others
through our Website,
send us the file as well as a complete description of the data and analysis you
are carrying out. Include information on how to get the data (if not a
URL). We will create an archive of user contributions.
Macros
The same scripting used to make session files can be used to make macros.
Macros differ from session files in that they are designed to automate
the generation of smaller pieces of a WebWinds session. One important functional
difference between macros and session files is that the commands in a macro
can be re-executed at any time during a session. To start creating a macro,
select "Create Macro" from the "Macros" line in the "Utilities" menu.
All subsequent WebWinds operations will be saved in a file with the name
macrox.slang where x is a number, until the user selects
"End Macro" from the same menu. The same requirements for changing the
names of macro files apply as for session files. To execute a macro, simply
select "Utilities", "Macros", "Run Macro" and the appropriate macro name.
One sample macro is shipped with WebWinds. It brings up an Image, Slider
and Color tool.
General requirements
When running any slang file (session or macro), you must not delete applications
until the script has completed its operation. After the script is complete,
the user may add to or alter the session in any normal way. Also, before
rerunning a session from the Desktop menu, all
other windows must be closed. On Unix machines, it is wise to enable 'auto-placement'
of windows, if applicable.
Tricks and Gotchas
Scripts (both session files and macros) generated by WebWinds may have
commands out of sequence from what you would expect. Keep in mind that
when changes to text fields are made, they are not recorded in the .slang
file until a button or menu choice is selected. Thus, e.g., if you insert
a pause designed to allow the user to alter a text field after making a
nominal choice for that text field, the choices will be inserted *after*
the pause statement. You will then have to edit the .slang file to move
the pause statement to its proper location.
WebWinds Home
/ Oct 5, 2001