When configuring External Commands or Compilers it is possible to use a number of variables in the application settings path and the LOG file path. These are described below.
Note: These variable names are all case-sensitive so, for example %File% will work, but %file% and %FILE% will fail to produce the expected results.
Full path name, including drive specifier, of current file.
Example:
C:\MyProg.exe "%File%"
Becomes:
C:\MyProg.exe "C:\Documents and Settings\user\This File.txt"
Full path, including drive specifier, of directory in which current file is saved.
Example:
C:\MyProg.exe -o "%Dir%" ...
Becomes:
C:\MyProg.exe -o "C:\Documents and Settings\user\"
Short path name, including drive specifier, of current file.
Example:
C:\MyProg.exe "%File%"
Becomes:
C:\MyProg.exe "C:\DOCUME~1\user\MYDOCU~1\ThisFi~1.txt"
Full short< path, including drive specifier, of directory in which current file is saved.
Example:
C:\MyProg.exe -o "%Dir%" ...
Becomes:
C:\MyProg.exe -o "C:\DOCUME~1\user\MYDOCU~1\"
Name, without extension, of current file.
Example:
C:\MyProg.exe "%Name%"
Becomes:
C:\MyProg.exe "This File"
Extension of current file name.
Example:
C:\MyProg.exe -e %Ext%
Becomes:
C:\MyProg.exe -e .txt
Current project name.
Example:
C:\MyProg.exe -p "%Project%"
Becomes:
C:\MyProg.exe -p "New Project"
Current project file path.
Example:
C:\MyProg.exe -p "%ProjectDir%"
Becomes:
C:\MyProg.exe -p "c:\projectfile.ppr"
PSPad application path.
Example:
C:\MyProg.exe -p "%PSPath%"
Becomes:
C:\MyProg.exe -p "C:\Program Files\PSPad\"
Full path name, including drive specifier, of current file preceded by "file://localhost/"
Example:
C:\MyProg.exe "%URLFile%"
Becomes:
C:\MyProg.exe "file://localhost/C:/Documents and Settings/user/This File.txt"
Full path name, including drive specifier, of current file preceded by "http://localhost/"
Example:
C:\MyProg.exe "%HttpFile%"
Becomes:
C:\MyProg.exe "http://localhost/C:/Documents and Settings/user/This File.txt"
If start of path of current file matches value of setting in "Settings > Program Settings > Internet > Document Root" then the variable will be replaced with the value "http://localhost/" + the path relative to Document Root. Otherwise variable equates to %File%.
Example:
Assume the Document Root is set to "C:\Inetpub\wwwroot" and the current file path is "C:\Inetpub\wwwroot\test.htm" C:\MyProg.exe "%PHPFile%"
Becomes:
C:\MyProg.exe "http://localhost/MySite/text.htm"
Currently selected text.
Prompt user to enter value.
Note: If "Cancel" is pressed when prompt is displayed, command will not be run. To run command with no value, delete any text in prompt's input box and press "OK"Word at current cursor position.
Line number of current cursor position.
Path where applications store data by default.
Path to the user's home directory.
Example:
C:\MyProg.exe -p "%HomePath%"
Becomes:
C:\MyProg.exe -p "\Documents and Settings\UserName"
Default temporary directory used by applications for current user.
Example:
C:\MyProg.exe -p "%Temp%"
Becomes:
C:\MyProg.exe -p "C:\DOCUME~1\UserName\LOCALS~1\Temp"
Path of profile for current user.
Example:
C:\MyProg.exe -p "%UserProfile%"
Becomes:
C:\MyProg.exe -p "C:\Documents and Settings\UserName"
Path of operating system directory.
Example:
C:\MyProg.exe -p "%WinDir%"
Becomes:
C:\MyProg.exe -p "C:\WINDOWS"