Previous Up Next

14  command line Switches

syn [switches] [files] [switches] [files] [...]
-p:
Prints the given file(s) to the default printer, and closes the program, just like Notepad. syn doesn't care whether this switch is before or after the filename(s), i.e. "syn.exe readme.htm -p" is the same as "syn.exe -p readme.htm".
-exhtm:
Exports the given file(s) to a HTML File using the same filename but with the extension htm, and closes the program.
-exrtf:
Same as above but the files will be exported to a RTF file. You can also combine the switches -p, -exhtm and -exrtf, e.g. "syn -p -exhtm myfile.ext" will print and export the file "myfile.ext".
-extex:
Exports the document to a LaTeX file.
-w:
Shows the Welcome dialog (Figure 32) at startup even when you've deactivated it.
-n:
Shows the New dialog (Figure 30) at startup.
-op:
Shows the Open dialog.
-r:
Opens the files behind this switch in read-only mode.
<>Note: This switch must be before the filenames, e.g. "syn.exe readme.htm -r" will not open the readme file read-only, but "syn.exe -r readme.htm" will open it read-only. Only files with this switch before are opened read-only.
Example: syn.exe -r file1.txt file2.txt -r file3.txt. In this example the file file1.txt and file3.txt are opened read-only, the file file2.txt is not read-only.
-nd:
Creates a new empty document. If there is a -r switch before it will be read-only.
-line, -col:
When given, it places the Caret at this position this line in the Editor. This switches must appear before the filename from the document.
Example: syn.exe file1.txt -line 10 -col 2 file2.txt. This will cause that the line 10 in file2.txt will be highlighted, but not in file1.txt. It is not necessary that both switches appear, -line or -col alone will also work.
-highl:
If set the line will be highlighted, must be used with -line, -col.
-script:
Executes a Script file.
Example: syn.exe -script "D:\My Documents\MyScript.vbs".
-nodialogs:
It doesn't show any Dialogs at startup, SynTray uses this Switch.
Priority is the order like above, when you pass all switches only the print switch is processed, if you pass the -w and the -n switch only the -w switch is processed. You can combine the switches -p, -exhtm and -exrtf. When you pass a filename and one of the switches -w or -n, syn loads this file and shows the requested Dialog. This switches are not case sensitive.


Previous Up Next