Silverfrost Logo About Us | Contact Us
 

Creating and using commands

Commands that are normally executed from a Command Prompt (DOS box) can be saved and attached to an accelerator key. Standard components can be replaced by markers. For example %f represents the name of the active document (see below for details). Output from a command is directed to the same Output window that is used for a Build process. If your command generates standard error messages then you will be able to double click on a line in order to go to the relevant source line.

To create a command start from the Tools menu and select Commands.

 

Click on New and, if you wish, give the new command a meaningful name. You can also attach an accelerator key to the command (a box labelled "Used by" indicates when the selected key is already in use).

Type the command into the Command box. Commands normally begin with the name of an executable file. Often the executable is on the PATH. In some cases you may need to include the file extension (.exe). Executable file names that include spaces should be set in double quotation marks.

Here is a list of markers that you can use in a command.

%f

Denotes the name of the active document without its path and extension.

%e

Denotes the file extension of the active document without a leading dot (period).

%p

Denotes the full path of the active document.

%d

Denotes the folder for the active document.

%n

Denotes the line number of the caret in the active document.

%w

Denotes the word at the current caret position.

%t

Denotes the current project target. Only use this for projects.

%u

Denotes the string displayed in the 'Command line options' dialog.

%!

Represents a single % symbol.

Here is an example of a typical command used internally by Plato:

FTN95 %p /NO_BANNER /VS7 /DELETE_OBJ_ON_ERROR /ERROR_NUMBERS /UNLIMITED_ERRORS

Click on Run to close the dialog and run the selected command.

To delete a command, click on its name in the list and then press the Delete key.

Do not use Ctrl+K and Ctrl+M for accelerator keys because these are reserved for future development.

 

 

Copyright © 1999-2017 Silverfrost Limited