Home » Products » UltraEdit/UEStudio » Menu Commands (UE) » Advanced

Tool Configuration command

UltraEdit/UEStudio allows the user to configure up to 25 menu items to commands of the user's choice.  Additionally up to 25 additional tools may be configured for the active project by selecting the Project Tool Configuration menu item.

 

These commands may be any DOS or Windows commands, and when set up appear in the lower portion of the Advanced menu.

 

When the Tool Configuration menu item is selected, a dialog is presented allowing the user to specify the command line and action for each of the users choices.  Any tool changes may be saved by pressing the OK or Apply buttons.  The Tool Configuration dialog arranges different options for user-defined tools under the Command, Options, and Output tabs for easier management.  Each tab presents different settings related to configuration of the currently specified tool.  All three tabbed views include the Insert, Copy, and Delete buttons as well as the Tool List pane [5] which may be used to rearrange the list of currently defined tools.

 

 

Command Tab

This tab in the Tool Configuration dialog is used to create new tools or modify the defined options for existing tools.  Users may also rearrange the tool list here and changes made here will be reflected in the tools listed at the bottom of the Advanced menu.

 

Creating a New Tool

If any tools are currently listed in the Tool List pane [5] you may select a tool and press the Insert button to create a new tool.  This will cause the new tool to be added to the list above the selected item.  The following options may be defined for a tool under the Command tab:

 

Menu item name [1]

This is the name of the item as it appears on the Advanced menu and will be reflected in the Tool List pane [5] as well.

 

Command line

This is the actual command line [2] that will be invoked when the tool is run.  If desired, it may contain a "%f" that will be replaced by the full directory specification and filename of the active file.  The file will be saved first if changes have been made.

 

For example, you might 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:

 

c:\comp\compiler "%f"

 

When the command is executed, the %F will be replaced by the full directory path, filename and extension 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        Filename 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 project *.prj project file (%r for long name, %R for short name)

%RP       This may be used for full path of the project *.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)

 

%ftpl        This returns the full path of the local copy of an FTP file when opened in UltraEdit.  For instance:  C:\DOCUME~1\[username]\LOCALS~1\Temp\myFile.001

 

%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.  Please note: this command does not require the "closing" percent sign "%".

 

%line%        This instructs UltraEdit to add the line number of the cursor into the command line in place of %line%. First line has number 1.

 

%col%        This instructs UltraEdit to add the column number of the cursor into the command line in place of %col%. First column has number 1.

 

Working directory

This is the working directory [3] for the specified command.  If applicable, the process will be started with this as its working directory.  As above, the %p may be used to specify the path.  It should be noted that UltraEdit has special handling for the working directory and quotes should not be used when specifying the working directory (i.e. %p rather than "%p" should be used in this case).  

 

If quotes are used to specify the working directory users will likely see an "Error Creating Process 267" which indicates that the specified working directory is not valid.

 

Toolbar/bitmap icon (file path)

This [4] allows the user to specify a bitmap or icon file to be used on the toolbar for the current selected tool. The browse button allows the user to browse for the bitmap or icon.  The bitmap or icon will be scaled to fit on the toolbar.  Each file should contain a single bitmap or icon.  If this is not defined, the default tool icon will be used.

 

Tool List pane

All defined tools will be listed in the Tool List pane [5] and users may rearrange tools by selecting them and using the Up and Down buttons to move the selected tool in the list.

 

Options Tab

This tab in the Tool Configuration dialog is used to define options for the currently selected tool.  The following options are included.

 

 

Program Type Selection

The Program Type [1] may be configured here.  It is important that the selection of DOS program or Windows program match the type of program being invoked by the tool.

 

Save active file

If Save active file [2]  is checked, the editor  will save the active file before running the tool, otherwise it will not (unless Save all files first is checked).

 

Save all files first

If Save all files first [2] is checked, the editor will save all open files before running the tool.

 

Tool List pane

All defined tools will be listed in the Tool List pane [3] and users may rearrange tools by selecting them and using the Up and Down buttons to move the selected tool in the list.

 

Output Tab

This tab in the Tool Configuration dialog is used to define output options for the currently selected tool.  The following options are included.

 

 

Command Output (DOS Commands ONLY) [1]

DOS command output may be optionally captured to a file.  The four options for DOS command output are:

 

1) Append to existing (create new file if one does not exist)

2) Replace existing

3) Create new file

4) Output to list box (Output Window). 

 

This list box allows the user to double-click on a line of the captured output and the editor attempts to open the referenced file and position to the specified line if found.

 

If the Show DOS box checkbox is checked, a DOS window will be shown as the command is being executed, otherwise the DOS window will be hidden.

 

If the Capture output checkbox is not selected then neither the output of the tool or any associated error output will be captured.

 

As several commands may be configured, it is quite possible the user may wish for some commands to always create a new file, while other commands should replace the existing file (or append to it).  For this reason, each capture mode (append, replace, new) will create a new file for that mode if one does not exist, and each time a command is run, the file for the given capture mode will be append to or replaced if appropriate, or a new file created if selected.

 

Replace selected text with

This [2] indicates that at the completion of the tool command, the captured output or contents of the clipboard will be used to replace the current selection (or inserted at the cursor position if no selection), or if no replace is selected, the output will be displayed as normal.

 

Tool List pane

The Tool List pane [3] shows the currently configured commands.  Clicking on a command in this list will cause the associated parameters of this command to be loaded and they may then be modified.  To keep the changes, the user MUST press OK or Apply to save any tool configuration changes.

 

If you click on an item, you may delete it by selecting the Delete button.

 

Output Window

If a tool is configured that returns errors to the output window (such as a compiler), UltraEdit and UEStudio will open the referenced file to the specified line if the user double-clicks on the error listing.  For this to be supported the file must be referenced in the following format [FULL PATH(Column Number): Error Message] i.e.:

 

C:\Development Path\ProjectDev\EditWindow.c(341): Undefined variable "GeneralError"

 

Requirements

DOS commands require that CMD.EXE be in the path.

Attachments
There are no attachments for this article.
Related Articles
DOS Command command
Viewed 764 times since Thu, Oct 13, 2011
Display/Modify Templates command
Viewed 469 times since Thu, Oct 13, 2011
Silent Installation
Viewed 5141 times since Thu, Oct 20, 2011
Batch Builder dialog
Viewed 636 times since Thu, Oct 20, 2011
Set Code Page/Locale command
Viewed 1148 times since Thu, Oct 13, 2011
INI File Selection and Advanced Settings
Viewed 1076 times since Thu, Oct 20, 2011
Run Windows Program command
Viewed 718 times since Thu, Oct 13, 2011
.NET Framework Code Protector dialog
Viewed 548 times since Thu, Oct 20, 2011
Advanced menu
Viewed 798 times since Thu, Oct 13, 2011
DDE Support
Viewed 612 times since Thu, Oct 20, 2011