XRNS Script Frontend 1.08
Developed by Alexander Stoica 2007 - 2010
License: Public Domain
http://xrns-php.sourceforge.net
Use info@beatslaughter.de for feedback or bug reports.
http://www.beatslaughter.de
What is it?
XRNS Script Frontend can be used, to provide a graphical user interface for command line
scripts written in PHP on the windows operating system.
How does it work?
The frontend includes a stripped down version of the PHP scripting language, which is
known for easy XML programming and is widely used. It's also possible to use external
command line tools without requiring the user to copy them somewhere into a known path.
Each script has a small config file, which defines how the GUI should be build and
also holds some other infos. A more in depth look at this file will follow shortly.
The folder "php" holds the PHP commandline interpreter and a windows batch file, which
allows one to generate a phpinfo.txt, which might be of help when developing own scripts.
Any additional scripts go into the "scripts" folder with their corresponding config file.
If a script relies on any extra command line tools, one should put them into the "utils"
folder.
Included in the "scripts" folder are version 1.0.7 of the XRNS-PHP scripts.
Optionally, you can download the scripts separately or get works in progress from SVN.
http://sourceforge.net/project/showfiles.php?group_id=203983
http://sourceforge.net/projects/xrns-php/develop
Script configuration file format reference
The script configuration files are just normal *.ini files widely used by other software too.
You should name the configuration file using the same basename as your script. For example,
if the script is named "yourscript.php", the configuration file should be named "yourscript.cfg".
The first line should always be the name of the section.
[config]
The following keys are used to provide general information about the script and are self explaining.
caption=Name of the script
author=Coded by John Doe.
url=http://www.johndoe.com
description=Short description, what your script does.
The "gui" key specifies, how the interface will be created. It accepts simple keywords, which are
translated by the frontend. The order of the keywords is important, since all the information the user
selects gets passed in that order as commandline parameters to the PHP script. Mutliple keywords need to be
separated by a semicolon ";".
Following the tradition of the first example in other programming languages, here is a simple label
showing "Hello world". The "label" keyword is used to place additional descriptions on the interface
for the user. The text needs to be enclosed by round brackets "()".
gui=label(Hello world)
The "text" keyword can be used to request any type of text to be passed to the script. If you specify the keyword with
optional round brackets "()", one can set a default text show in the textfield.
gui=text
gui=text(default text)
The "clipboard" keyword will pass the clipboard contents to the script through a temporary file. The script
is responsible for writing back the modified data to this file. When the script has finished executing, the contents
of that temporary file will be shown in the textbox on the interface.
gui=clipboard
The "folder" keyword allows the user to browse for a folder. The chosen path will then be passed to the script.
gui=folder
The "file" keyword allows the user to browse for a file to open. The chosen file will then be passed to the script.
This keyword is usually used to select a source file.
gui=file
It's also possible to specify extensions, including a default one, which will be used when the user leaves the
extension blank when entering or selecting a filename in the file chooser dialog. All extensions are enclosed in round
brackets "()" and each extension will be separated by a comma ",". Prepend a "def:" to the extension, which one wants to define
as default.
gui=file(def:xrns, xrni, zip)
The keyword "output" behaves nearly like the "file" keyword with some exceptions. The current directory will be set to
the path of this file, similar like the user has called the PHP interpreter from this location. This keyword is usually
used to select a destination file.
gui=output
gui=output(def:xrns, xrni, zip)
The last keywords are "options" and "dropindex". They are used to
display a combobox, where one can choose one of multiple options.
It's also possible to define a default selected entry. Since version
1.06:
- options: sends the selected value to the script
- dropindex: sends the the selected index to the script (first element starts at 0)
gui=options(1, 2, def:3, 4, 5, 6, 7, 8, 9, 10); dropindex(low, def:med, hi, super)
As a summary, here is an example of how a complete configuration file looks like.
[config]
caption=Name of the script
author=Coded by John Doe.
url=http://www.johndoe.com
description=Short description, what your script does.
gui=label(Select an option:); options(1, 2, def:3, 4, 5, 6, 7, 8, 9, 10)
Thanks and Credits
This product includes PHP software, freely available from:
http://www.php.net/software.
Xiph.Org Foundation for the flac and ogg encoder/decoder utilities.
http://www.xiph.org
Info-ZIP Workgroup for the zip and unzip utilities.
http://www.info-zip.org
gnu.org for the CVS command line utility.
http://www.nongnu.org/cvs
Pelle Orinius for his excellent C programming IDE and compiler.
http://www.smorgasbordet.com/pellesc
Dac Chartrand for his original idea.
http://www.trotch.com
Marvin Tjon for some extra features added Version in 1.06
History
Version 1.08 (04/21/2010)
- Changed: Updated XRNS-PHP scripts
- Changed: Updated included PHP version to 5.2.13
Version 1.07 (06/06/2009)
- Changed: Updated included PHP version to 5.2.10
- Changed: Removed CVS versioning support
- Changed: Scripts are now included (again)
Version 1.06 (03/16/2008)
- Changed: Updated included PHP version to 5.2.5.
- Added: Success or error dialog depending on the script exit code. Currenly 0 = ok, 1 = write protected, 2+ = generic error,
but may change later.
- Added: dropindex keyword, returns the selected index to the script.
- Changed: The options keyword returns value of the dropdown again.
Version 1.05 (11/07/2007)
- Fixed: Textfields did not restore their last used value.
- Changed: The options keyword returns now the selected index to the script, instead of the full text.
- Changed: Updated included FLAC version to 1.2.1.
Version 1.04 (09/08/2007)
- Changed: Updated included PHP version to 5.2.4.
Version 1.03 (08/31/2007)
- Changed: The update redirects now to the SourceForge download page.
- Changed:
The file "update_scripts.cmd" was renamed to
"get_cvs_dev_version_scripts.cmd", so that it's more clear that these
are work in progress versions.
Version 1.02 (08/29/2007)
- Added: New keyword "text", to accept any text input from the user.
- Changed: The frontend has no included scripts anymore, instead it's possible to get all the files with an online update.
Version 1.01 (08/19/2007)
- Fixed: Using one of the keywords "options", "file" or "output" with only one parameter made the application hang.
Version 1.0 (08/13/2007)