D&Do v. 1.0 Prev Next Top
Note: If you simply use D&Do with metascripts that are written by others, you do not need to read this sub-section but you might find interesting information.
As long as the D&Do activity is not triggered, D&Do is only collecting a list of drops. The drop list is filled in the following sequence:
- Tagged drops (if the metascript specifies such tags)
- Untagged drops
For example, if the metascript specifies 2 tags, the drop list will be filled as follows:
- Index of 0: drop that is associated with the first tag (or tag 0)
- Index of 1: drop that is associated with the second tag (or tag 1)
- Index of 2 or more: an untagged drop
On the argument list template (an example can be seen in the Metascript Exploration sub-section and in the Metascript Tutorial section), they are identified by the template variable *n (n is a number) where n is the tag number. The template variable *# identifies untagged drops as a collection. (See also the Default Command line Template sub-section)
Note: If needed, the character pairs that identify the template variables can be redefined.
At the trigger point (either from an identifiable drop or from a target area click), a chain of events are occurring as illustrated and described below:

- One specific variant of the argument list template (the current variant) is used for creating the resolved argument list.
- An argument list template contains:
- A static part (non-interpreted)
- Zero, one or many instances of the template variable: clipboard. These instances are represented by the character pairs: **.
- Zero, one or many instances of a template variable: tagged drop n. These instances are represented by the character pairs: *n, where n is the tag number.
- Zero, one or many instances of the template variable: untagged drops. These instances are represented by the character pairs: *#. They are processed collectively as one list, or one item by one, in sequence. One by one is applied if the metascript Basic Behavior (BB) parameter is set to 5 or 7.
- The argument list is then resolved, converting template variable (such as *1) with the content of the related drop or clipboard.
If specified, proper quotation marks are added to the arguments (See Quotation Marks Methods)
A command parser segments the resolved argument list (a one-line text) into its items. The parser is either, the combined Java and operating system default, or an internal parser provided by D&Do.
- The program is called, passing the resolved and segmented argument list to it. It may be called for each untagged drop, if the parameter BB is set to 5 or 7..
- The scrip executes and outputs data to the system output and optionally to other output ports (e.g. files, network socket, audio card, etc). These other outputs are not serviced by D&Do
- The system output content is written into the clipboard if the metascript is configured for with the parameter OUTC:1.
- The program exit code is outputted into the message list of D&Do
From that point, the user can paste the modified content of the system clipboard into a desktop application.
Note: Without registration, D&Do processes only the first instance of each template variable; this is a controlled feature. Usually, a program argument is associated to a distinct template variable; this is the most common use but this is not a theoretical necessity.
Prev Next Top
Copyright(c) 2003-2004 Marcel St-Amant