This command allows a Windows program to be executed from within UltraEdit. The output is not captured.
A dialog box is presented that allows the command to be specified (with a browse button) and the working directory to be specified (working directory only supported with UltraEdit).
The command line specified should be the full path of the file to be executed, unless it is in the Windows directory, or the Windows System directory.
The working directory should be the full path of the working directory, or left blank if not required.
In order to allow maximum flexibility of programs to be run, a special command line sequence is permitted that will cause the active filename to be inserted into the command line and passed to the program to be executed. For example:
You set up a command to run a compiler and you want to invoke the compiler with the file you are currently editing. If you change files you want the compiler to be invoked with the new file. The compiler is c:\comp\compiler.
Specify the following command in the dialog box:
c:\comp\compiler %F
When the command is executed, the %F will be replaced by the filename of the active window. The file will be saved before the command is executed.
The following commands may be used to pass a portion of the full qualified filename:
%P Path only ("C:\project\test\")
%N File name only ("test")
%E Extension only (".c")
%P%N%E is equal to %F which is ("C:\project\test\test.c") in the example above.
NOTE - If the %f, %p, %n, %e are lower case the filenames are passed as long filenames and should be put in quotes, i.e. "%f" or "%p%n" etc. If the %F, %P, %N, %E are in upper case the filename and path will converted and passed as the "8.3" short filename specification for maximum compatibility with DOS programs.
Additionally the following commands are available:
%R This may be used for the full path/name of the *prj project file (%r for long name, %R for short name)
%RP This may be used for the full path of the *.prj project file (%rp for long name, %RP for short name)
%RN This may be used for the name only of the *.prj project file (%rn for long name, %RN for short name)
%modify% In some cases it may be necessary to modify the command line parameters each time the tool is run. To do this, add %modify% in the command line and when the tool is run a dialog box will be shown allowing the user to modify the command line or cancel and run without modification.
%sel% This instructs UltraEdit to add the highlighted/selected text from the active document into the command line in place of the %sel%.
%Env: This allows the user to use an environment variable in the command. The environment variable immediately follows the %Env: and UltraEdit replaces this with the contents of the matching environment variable.
%line% This instructs UltraEdit to add the line number of the cursor into the command line in place of %line%. The first line is number 1.
%col% This instructs UltraEdit to add the column number of the cursor into the command line in place of %col%. The first column is number 1.
To run a DOS program use the DOS Command.