Scripting, Part 2

In this posting I’ll be showing you some of the new user interface associated with scripting.

Firstly, when you upload your script to the on-line repository, you’ll see a somewhat modified dialog.

001.jpg

(oops. Ignore the User ID and Date fields. Those will disappear for the released version)

In a similar fashion to user-contributed plans, you specify a category for the script, and also some (optional) keywords.

Note that you can upload and overwrite a script only if you were the original creator. If not, the dialog will warn you and disallow the upload. Only registered users can upload scripts.

Uploading scripts is now handled automatically by the server. In V1.x, it required some interaction from me before a script was posted.

When you download scripts, you’ll see a completely new dialog, that is reminiscent of the user-contributed plan download window (see a previous post).

scriptdl.jpg

The list of scripts is now hierarchical and allows you to show scripts in various ways, just like the user-contributed plans.

There’s also a dialog that lists your scripts and allows you to delete them. No longer do you have to ask me nicely.

deletescript.jpg

Finally, a whole new concept: Event scripts. You can specify scripts to be run when various events occur. For example, when a plan document is opened, you might want to run a script automatically to compute some user-defined fields, etc.

Here’s the (preliminary) dialog that allows you to select the events to be scripted.

scriptevents.jpg

You can specify an event script either as just for the currently open plan document, or globally for all plan documents.

Oh, yes, I should mention that scripts that are run more than once are now only compiled on the first run, so that the second and subsequent runs are considerably faster (typically a few milliseconds), since the scripts are actually compiled down to machine code, not interpreted.