Pashua ist a tool for creating ‘real’ dialog windows for Perl, PHP, Tcl, Python, Groovy, Ruby, Rexx and shell scripts as well as AppleScript. The GUI elements which can be used for such dialogs include text input fields, checkboxes, radiobuttons, popup menus, buttons and so on. Moreover, it is also possible to embed images or PDFs.
Any data submitted from the dialog will be passed on to the calling script, which can (of course) use it for anything.
To describe the dialog window, Pashua uses a very simple syntax. All the tedious details such as positioning the elements, calculating the window size etc. are handled automatically by Pashua, thus you can fully concentrate on your application.
Pashua is free. However, if you appreciate it and would like to send a “Thank you”, there are a number of ways to do that. Please take a look at my website for more information.
In the folder “Examples” on the disk image containing this Readme, there are several scripts which demonstrate how to use Pashua:
example.applescript
By calling from AppleScript.example.groovy
By calling from a Groovy script. The file contains the class PashuaRunner
which you can use in your own scripts.example.php
By calling from a PHP command line script. The file contains a function called pashua_run()
, which calls Pashua and returns the result.example.pl
by calling from a Perl script. This file uses the Perl module Pashua.pm
(located in the same folder), which manages communicating with Pashua and parsing the result. For convenience reasons, you should copy this module to a directory that is in @INC
, for example /Library/Perl
. The module contains documentation in Perl’s POD format.example.py
By calling from a Python script. This file uses the Python module Pashua.py
(located in the same folder), which manages communicating with Pashua and parsing the result.example.rb
By calling from a Ruby script. This file uses the module Pashua.rb
(located in the same folder), which manages the communication with Pashua.example.rexx
By calling from a Rexx script. Using this script requires an installation of Rexx/Regina. If necessary, the path in the Shebang line (the script’s very first line) must be changed to match your filesystem layout.example.sh
By calling from a shell script. The file contains a function called pashua_run
which you can use in your own scripts.example.tcl
By calling from a Tcl script. This file uses a function from file pashua_run.tcl
(located in the same folder), which manages communicating with Pashua and parsing the result.The AppleScript example can be launched by simply doubleclicking the icon. All the other examples can be launched by entering the script path at the terminal (the easiest way to do this, is to drag the script onto Terminal.app).
Important: In order to work, Pashua (the application itself, not the calling script) must be located in the global application folder /Applications
, in your personal application folder ~/Applications
, in the folder containing the calling script or in the working directory. Otherwise execution will fail. But of course you can modify the search locations according to your filesystem layout. (But to simply launch the provided example, you do not have to install anything: they will run directly from the disk image.)
Pashua’s explains the configuration syntax, as well as any GUI element types and their attributes.
Basically you can use Pashua from any language that is able to write a file or write to a Unix pipe, call an application with command line arguments, manipulate strings and declare variables dynamically or handle associative arrays.
The current version was developed and tested on Mac OS X 10.6. Pashua should run without problems on Mac OS X 10.4 or newer.
openbrowser
und savebrowser
: Improved the behaviour regarding pre-selected folders in the file dialogPashua 0.9.4.5 was released on 04/27/2011.
Release notes for previous versions can be found on the website
The following users contributed code, fixes and/or translations: Bruce M. Axtens, Hans Haesler, Mike Hall, Ed Heil, Canis Lupus, James Reese, Daniel Robillard, Eddy Roosnek, Tor Sigurdsson, Bruce Woller.
This application is provided as-is. Support is not included. Use this software at your own risk. If for some obscure reason any damage or data loss may arise from using it (which in my opinion is nearly impossible), it is nobody else’s problem than yours.
Carsten Blüm
E-Mail: macapps@bluem.net
Pashua Homepage: www.bluem.net/en/mac/pashua/