Command line Argument Macros or Parameter Macros are commonly seen in applications like text editors, file managers, and compiler IDE's who allow you to "customize" their toolbars or menu's.
Common examples of these "Macros" as we call them can be seen in especially Delphi, Freepascal, Total Commander, EditPlus.
Examples:
In editplus:
Macro Description
$(FilePath) Inserts file name of current document with full path.
$(FileDir) Inserts full path of current document without the file name.
$(FileName) Inserts file name of current document without path.
$(FileNameNoExt) Inserts file name of current document without path and extension.
$(FileExt) Inserts file extension of current document.
$(ProjectName) Inserts current project name.
$(CurLine) Inserts current line number where the cursor is located.
$(CurCol) Inserts current column index where the cursor is located.
$(CurSel) Inserts selected text.
$(CurWord) Inserts current word.
$(WindowList) Displays Window List dialog box and select desired file name.
In Total Commander:
Macro Description
? as the first parameter causes a Dialog box to be displayed before
starting the program, containing the following parameters. You
can change the parameters before starting the program. You can
even prevent the program's execution.
%P causes the source path to be inserted into the command line,
including a backslash (\) at the end.
%N places the filename under the cursor into the command line.
%T inserts the current target path. Especially useful for packers.
%M places the current filename in the target directory into the
command line.
%O places the current filename without extension into the command
line.
%E places the current extension (without leading period) into the
command line.
Note: %N and %M insert the long name, while %n and %m insert the DOS
alias name (8.3).
%P and %T insert the long path name, and %p and %t the short path name.
(Same for %o and %e)
%% inserts the percent-sign.
%L, %l, %F,
%f, %D, %d create a list file in the TEMP directory with the names of the
selected files and directories, and appends the name of the list
file to the command line. The list is deleted automatically when
the called program quits. 6 types of list files can be created:
%L Long file names including the complete path,
e.g. c:\Program Files\Long name.exe
%l (lowercase L) Short file names including the complete path,
e.g. C:\PROGRA~1\LONGNA~1.EXE
%F Long file names without path, e.g. Long name.exe
%f Short file names without path, e.g. LONGNA~1.EXE
%D Short file names including the complete path, but using the DOS
character set for accents.
%d Short file names without path, but using the DOS character set
for accents.
|