Use this procedure to create an action that accepts a dropped file but does not prompt for a file when the action icon is double-clicked.
Create an action definition for the double-click functionality.
Use the ARG_COUNT field to specify 0 arguments. Use a syntax for the EXEC_STRING that does not accept a dropped argument.
Create a second action definition for the drop functionality.
Use the ARG_COUNT field to specify >0 argument. Use a syntax for the EXEC_STRING that accepts a dropped file.
For example, suppose the following two command lines can be used to start an editor named vedit:
To start the editor with a file argument that is opened as a read-only document:
vedit -R filename
The following two actions create drop and double-click functionality for an action named Vedit. The first action has precedence when the database is searched for a match, since ARG_COUNT 0 is more specific than the implied ARG_COUNT * of the drop functionality definition.
# Double-click functionality ACTION Vedit { TYPE COMMAND ARG_COUNT 0 WINDOW_TYPE PERM_TERMINAL EXEC_STRING vedit } # Drop functionality ACTION Vedit { TYPE COMMAND WINDOW_TYPE PERM_TERMINAL EXEC_STRING vedit -R %Arg_1% }