Dropcmd Class
File Type
Command
Args
When a workbench icon is dropped on this object, the file type is found using the main File Types list. Once located, the matching command from here is executed.

The File Type attribute may include AmigaOS patterns, so it is possible, for example, to match any image type with image/*. If a file could not be identified, or there is no command for its type, an error will be reported. To provide a default file type, a name match on * can be used in the main File Types list.

Commands are run asynchronously. To control the stack size and priority, double click the entry or select Edit

Layout
The Dropcmd object provides all the features of a Layout group, so classes such as bitmaps or icons may be included.

If a Dropcmd is included inside of a of a Dropcmd, then the inner most object will be used. This allows the use of a large, general Dropcmd, with smaller, specific actions inside it.

Also note that variable definitions exported by an object can be used anywhere inside that object. For example, one might include a DropCmd object inside of a Screenswitch object. The command arguments can then reference both the DropCmd variable and the Screenswitch variables, so that for example, dropping an icon for a picture file might view the picture on the indicated public screen. There are many possibilities.

Variables The following variables are exported by objects of this class. Variable names are case sensitive.

Variable Description
DCFiles A space separated list of filenames. If more than one icon is dropped, then contiguous icons that have the same action will generate multiple names in this variable. This allows dropping 3 icons on an object, and passing all 3 to the same invocation of an image viewer, for example. This only works if all the files have the same action.