D&Do v. 1.0 Prev Next Top
These parameters define the number of tags, and for each one, its associated drop type criteria and its hint text. A hint text and the drop type criteria for untagged drops are also defined there.
- DN:
Defined number of tags. Its value is a digit character between 0 and 9; it represents the expected number of tags. Default value is 0; invalid characters are interpreted as 0. If BB:5 or BB:7, DN should be one or more.
- DH:
Drop hint. If the first character is not a digit, what follows is a short hint text that will be displayed on the target area when D&Do expects an untagged drop. Default value is "Drops". If the first character is a digit, it represents the tag number. What follows is the short hint text that will be displayed on the target area when D&Do expects the drop that will be associated with that tag. The default value is "Not Defined" for every tag.
- DHTT:
Drop help tool-tip. It is an optional and more detailed description of what is expected as the next drop. If the first character is not a digit, what follows is a text that will be displayed on the target area tool-tip when D&Do expects an untagged drop. If the first character is a digit, it represents the tag number. What follows is the text that will be displayed on the second line of the target area tool-tip when D&Do expects the drop that will be associated with that tag. The default value is that no text is displayed on the second line. Note: It fulfill the same purpose as the DH parameter except that you can add a much longer description, not just hint.
- DT:
Drop type criteria. If the first character is a space, the following value represents the drop type criteria for untagged drops. If the first character is a digit, it represents the tag number. What follows represents the drop type criteria for that tag. Default value is ANY. If the drop is not compliant to the criteria, the D&Do target area will flash yellow and the status line will display an error message.
- ICON:
The file path name of a small picture or an icon that will be displayed on the target area. The purpose is to provide a graphical method of identifying or personalizing your metascript. The sub-directory scripts/icons is reserved for such icons but this is not a requirement. The default value is no icon.
Example: Here is a typical set of drop identification parameters:
DN:2
DH: Extra Drop
DH:0 First Tag
DH:1 Second Tag
DT: ANY
DT:0 DIR
DT:1 FIL
This example represents the case where:
Two tags are defined
For non-tagged drops, the target area will display "Extra Drop" and it will accept any drop type (ANY)
For the first tag (index 0), the target area will display "ID= First Tag" and it will accept a directory drop only (DIR)
For the second tag (index 1), the target area will display "ID= Second Tag" and it will accepts a file drop only (FIL)
Here is a screenshot of the effects of the ICON and DHTT parameters, where:
DHTT:0 ---Directory that will contain new sub-directories
ICON:scripts/icons/my32.gif

About the Enforced Drop Type Criteria
D&Do recognizes the following types of drops: DIR, FIL and TXT (See the "Drop item format" sub-section under the section Status Line). By default, D&Do accepts drops of any of the above types and of any content. Usually, the program or script validates its inputs and will signal any error. However, it is more efficient to reject immediately invalid drops.
The DT parameter contains the following fields:
- The tag number (0-9), or no number if it applies to untagged drops
- The drop type criteria. Itself, it contains the following fields:
- The drop type criteria code: a three-letter mnemonic (ANY, DIR, FIL, TXT or URL)
- Optionnally, the list of acceptable suffixes or prefixes (it is case neutral) and it depends on the above code.
The criteria code is one of the following:
- ANY:
Any dropped object is acceptable
- TXT:
Only a text drop is acceptable
- URL:
Only a text drop that can be interpreted as an URL is acceptable
- FIL:
Only a file objects is acceptable
- DIR:
Onlya directory object is acceptable
Through the DT parameter, you can specify which type of drop D&Do will accept for a specific tag (or for untagged drops). Optionnally, you can provide the list of acceptable suffixes (for ANY, DIR, FIL and TXT criteria code) or prefixes (for URL criteria code) that a drop must contain. In this context, a suffix corresponds to the text that follows the last period (including the period itself). This is especially useful for FIL drop type since it corresponds to the file name extension. It might be useful for the DIR type and, to a lesser extent, to the TXT type. In this context also, a prefix corresponds to the text that precedes the first "://" character sequence, where we expect to find the URL protocol (if indeed the drop contains only a valid URL expression, see below, after the example).
Example:
DT:1 FIL .wav .mp3 .au
This means that the second tagged drop (drop 1) should be a file with a file extension of .wav, .mp3 or .au (it will also accept files with extension .WAV, .MP3 and .AU).
The URL as an enforceable drop type criteria
Starting with D&Do version 1.1, you can also specify URL as drop type criteria code; it means that D&Do will accept only a text drop whose content can be interpreted as an URL. Such a drop might come from text desktop objects, from hyperlinks and from URL fields of some desktop applications or dialogs. Instead of TXT, you can narrow the acceptance criteria with the URL as criteria code. You can also specify the list of acceptable protocols, such as: file, http, https, ftp and other protocols. Here are some examples:
- For the first tagged drop, D&Do should accept only a text drop that can be interpreted as an URL with file protocol only:
DT:0 URL file
- For any untagged drop, D&Do should accept only a text drop that can be interpreted as an URL with http, https or ftp protocols only:
DT: URL http https ftp
- For the third tagged drop, D&Do should accept only a text drop that can be interpreted as an URL of any protocol:
DT:2 URL
Prev Next Top
Copyright(c) 2003-2004 Marcel St-Amant