Crossware

Table of Contents        Previous topic       Next topic       

Custom Tools

The tools menu can be customised to include additional user defined commands.  

Select Customize from the Tools menu to open the Customize and select the Tools tab.

Adding a Command

To add a command, click Add.  

In the Menu text field, enter the text that you wish to be displayed in the Tools menu.  

In the Command field, enter the name of the command to be run.  If this command is not in a directory pointed to by the PATH setting of your systems environment or is not in the initial directory, then you must include the full path of the command.

In the Arguments field, enter any command line arguments that you wish to pass to the command.

In the Initial Directory field, enter the directory that should be made the current directory before the command is run.

The command, arguments, and initial directory fields can contain the following macros which will be replaced by the appropriate text as follows:
    
$(CurCol)The current cursor column position within the active window.
$(CurDir)The current working directory (defined as drive+path).
$(CurLine)The current cursor line position within the active window.
$(CurText)The current text (the word under the current cursor position, or a single-line selection, if there is one).
$(FileDir)The directory of the file in the currently active text window.
$(FileExt)The filename extension of the file in the currently active text window.
$(FileName)The filename (without extension) of the file in the currently active text window.
$(FilePath)The complete filename of the file in the currently active text window.
$(TargetDir)The directory of the current target program or library.
$(TargetExt)The filename extension of the current target program or library.
$(TargetName)The filename of the current target.
$(TargetPath)The filename (without extension) of the current target program or library.
$(ProjectDir)The directory of the current project that contains the .XMK file.
$(ProjectName)The current project name (without the .XMK extension).
$(MapPath)The complete filename of the current map file
$(VariantPath)The full path of the directory specified by the VariantPath setting for the family member.

Win32 long filenames will be used in the above where replacement with a filename or path is required.  Alternative macros are provided which will use the shortened MS-DOS path and these should be used for commands that cannot handle long filenames.  These are:
    
$(DosFileDir)The directory of the file in the current active text window.
$(DosFileExt)The filename extension of the file in the currently active text window.
$(DosFileName)The filename (without extension) of the file in the currently active text window.
$(DosFilePath)The complete filename of the file in the currently active text window.
$(DosTargetDir)The directory of the current target program or library.
$(DosTargetExt)The filename extension of the current target program or library.
$(DosTargetName)The filename (without extension) of the current target program or library.
$(DosTargetPath)The complete filename of the current target program or library.
$(DosProjectDir)The directory of the current project that contains the .XMK file.
$(DosProjectName)The current project name (without the .XMK extension).
$(DosMapPath)The complete filename of the current map file
$(DosVariantPath)The full path of the directory specified by the VariantPath setting for the family member.

Removing a Command


To remove a command, select it in the Menu contents list and click Remove.



Move up/Move down

To change the order in which the commands are listed in the menu, select each command that you wish to move in the Menu contents list and use the Move Up and Move Down buttons to reposition it.


Save With

By default, a custom command will be saved with the application and so it will always be present on the Tools menu regardless of the current project.  However, if a project is currently open, you will have the chance to instead save a command with the project, with the target family or, if the VariantPath for the family member has been defined, with the family member.

Note that if commands are saved in separate locations, the order that you set up in the list may change.