====== Built-in Variables ====== HippoEDIT has rather rich set of built-in variables that can be used in different contexts: * **[[tools:start|Tools]]** - as parameters in argument, command, initial directory fields * **[[editing:auto_completion:templates|Code Templates]]** - as parameters inside of code template expand text * **[[editing:print:start|Print Headers/Footers]]** - as parameters inside print headers / footers * ** [[files:template|File Templates]]** - for pre-filing defaults * **Favorites** - as parameters inside path of favorites folders * **Plugins** - plugins can as read built-in variables as expose own one in global namespace Below find a list of variables you can use: ^ ^ Example ^ Description ^ ^ %DateTime% |03.10.2009 22:03:07| current date and time | ^ %Date% |03.10.2009| current date | ^ %Time% |22:03:07| current time | ^ %Year% |2009| current year | ^ %Month% |10| current month | ^ %Day% |04| current day | ^ %FileDate% | | last modification date of current document | ^ %FileTime% | | last modification time of current document | ^ %CurrentWord% |anyword|current word under cursor | ^ %CurrentLine% |12| current number of the line where the cursor is in | ^ %CurrentColumn% |72| current number of the column where the cursor is in | ^ %Clipboard% |text from clipboard| current content of the clipboard as text | ^ %[ ]% |C:\Programme\Internet Explorer\IEXPLORE.EXE| read registry value as %[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE]%| ^ %SelectedText% | selected word, words, line or lines | currently selected text | ^ %SelectedLine% | selected lines | currently selected lines, the template applied on every line | ^ %Document% | filename.ext | name of current document | ^ %FileNameWOExt% | filename | base name of current document without the extension | ^ %FileName% | X:\folder\path\filename.ext | name of current document incl. the path %FileDir% | ^ %FileDir% | X:\folder\path | Path of current file | ^ %OpenFiles% | X:\folder\filename.ext "Y:\folder name\file name.ext" Z:\test\a\b\file.ext | insert an space separated string with currently open files at the current place into the document or given as parameter to an external tool | ^ %%%|%%% | after inserting the template FOR x = 1 TO %%%|%%% the cursor is placed on the place of %%%|%%% | to place the cursor at an wished position | ^ %Variable name% | after inserting an template like %Test% user is prompted by an dialog labeled with //Test// where he can enter an string | named //Interactive// in context menu -> prompt the user with an dialog to insert an string to be inserted at the current place into the document or given as parameter to an external tool | ^ %InteractiveFile% | | prompt the user with an dialog to select a file. The path and file name will be inserted at the current place into the document or given as parameter to an external tool | ^ %InteractiveDir% | | prompt the user with an dialog to select an directory. This path will be inserted at the current place into the document or given as parameter to an external tool | ^ %OpenFilesInteractive% | | prompt the user with an list of currently opened files. The user can select one or more to feed them as parameter to an external tool | ^ %AppDir% | X:\path\HippoEDIT | current path to the folder with the HippoEdit.exe | ^ %AppDrive% | X: | current drive which holds the folder with the HippoEdit.exe | ^ %AppDataDir% | X:\path\HippoEDIT\Data | current path to the HippoEdit data folder | ^ %UserDir% | X:\Users\User\AppData\Roaming\HippoEDIT\ | referring user directory (directory where all user data has been installed. As \data, \workspaces *.config, for portable mode it equal to %AppDir%) | ^ % % | if you want to insert an %-sign itself. F.ex. for *.CMD Batch files, if you want to create an template like ECHO %1 %2 you have to write this as ECHO % %1 % %2 | the symbol % itself, //do not enter space between % % like here. This is only limitation of the wiki formatting here// | ^ %ProjectFiles% | | list of files from current project separated by space | ^ %ProjectDir% | | Project work directory | ^ %MainFile% | | Project Main File Name | ^ %MainFilePath% | | Project Main File Path | ^ %MainFileDir% | | Main Project File Directory | ^ %ProjectFilesInteractive% | | brings window with list of files from current project where you can select files you need | ^ %?% | | If found in template text causes HE to show for review/modify complete template with all expanded tags before explicit template usage. Can be used everywhere where templates are used: in tools, help items or editor. | Do not forget, you have also [[general:user-variables|user variables]] and [[general:environment-variables|environment variables]]