Command line parameters

From TED Notepad
Revision as of 11:43, 18 May 2006 by Jsimlo (talk | contribs)
You see work in progress here; this section already reflects future TED Notepad version 5.0.0.10.
This section may contain incomplete, premature, or mistaken information, prone to change without notice.

Usage

TedNPad.exe
            [ /lxx | /cxx | /sxx,yy | /a ]
            [ /p ] [ /nl ] [ /ns ]
            [drive:][path]filename

Note: All parameters must precede the filename and be delimited with at least one white-space to work properly. There must be no white-space between a parameter and its value, if any. Some of the parameters are exclusive and should not be used together, or the result may be undefined otherwise and may change from version to version.

/lxx Go to Line

After the file is loaded, automatically moves the caret to the beginning of the line xx. If there are not so many lines, the caret remains at the beginning of the document.

This parameter excludes /s and /a parameters.

/cxx Go to Char

After the file is loaded, automatically moves the caret to the character xx. If there are not so many characters, the caret is moved to the end of the document.

This parameter excludes /s and /a parameters.

Use this parameter along with the /l parameter to jump to a specific column on a specific line. If the chosen line is too short, the caret is placed respectively somewhere beyond it. In other words, when used in conjuction with /l parameter, the /c parameter behaves relatively to the line from the /l parameter.

Note: The caret is moved only after all the newline conversions are already done. If a Unix-type file is loaded and automatically identified, each newline is converted into two characters (i.e. CR/LF). Any given /c parameter should be specified likewise.

Template:Specific There is a difference in counting newlines. See section RichEdit clone.

/sxx,yy Set Selection

After the file is loaded, automatically sets the selection from character number xx to character number yy. If there are not so many characters, the selection is shortened.

This parameter excludes /l, /c and /a parameters.

Template:Specific There is a difference in counting newlines. See section RichEdit clone.

/a Select All

Automatically selects all text after the file is loaded.

This parameter excludes /l, /c and /s parameters.

/p Print

Prints the document after the file is loaded, then exits automatically.

/nl NoLoad Settings

Simply skips any loading of any settings/options/data from the Registry or from the Portable INI file. Can be used to quicken the application start-up or for any kind of troubleshooting.

/ns NoSave Settings

Simply skips any saving of any settings/options/data into the Registry or into the Portable INI file. Can be used to quicken the termination of the application or for any kind of troubleshooting.

Note, that even the Save checked settings button in the Settings dialog will not work. See section Settings dialog.

/dxx Do Command

(temporary parameter, officially unpublished)

This parameter can be used to auto-invoke an xx action in TED Notepad directly, after the application starts up and loads the file from the command line.

Caution: This parameter is a long-shot preparation for some macro support. Action numbers are not published by now and may be modified silently from time to time. They shall be published in the future. The behavior of this parameter may be modified silently from time to time until published as well.