Configuration and Customisation > The Settings File  >

Opening the Settings File

Last updated: 22/10/2008 12:26:11 GMT
Print (Alt+1) Previous (Alt+P) Beginning of ChapterNext (Alt+N)

When you open the settings file by selecting change/review settings on either WTC's directory dialling/setup menu or the Communications Mode settings menu, the settings file is first created if it does not already exist by copying the default configuration file, "wtc.stp", as the active default settings file, "wtc.wtc". The program then attempts to open both files side-by-side in the settings editor.

 

In the settings file itself (or on the command line), you can specify the path and filename of the editor program that is used to open the settings file, using the "s" setup directive. This directive is followed immediately by the file specification of the required editor, for example:

 

"snotepad".

 

There is no path specification in the above example because Notepad is a Windows program that can be found along your Windows path.

 

WTC uses its "global editor" to open the settings file if a specific settings editor is not defined. If the global editor is not found on your computer, Windows Notepad is used. The global editor by default is the Semware Editor Professional, a highly recommended text processor form Semware Corporation. There are several situations in WTC where you can specify an editor for a particular purpose and WTC will try to use TSE Pro if nothing else is set up in the configuration. However, TSE Pro is a third-party product, not part of Windows, and we cannot assume it is on your computer, so if not found, the default Windows editor (Notepad) is used instead. If TSE is present on your system,, the default WTC settings assume the TSE default installation folder, so a custom TSE installation will not be detected.

 

Using TSE Pro with WTC gives you the flexibility of customising the editing environment to better suit different situations. It is ideal for editing the settings file because you can create editor macros that help to ensure the file is valid. Settings file editing issues are discussed in more detail in the next section.

 

The program used to open the settings file does not have to be a standard text editor. The WTC settings file is plain text, so can readily be managed programmatically. Rather than editing the file directly, you could create your own front-end manager to enable you to work with the settings in any form you chose. TSE has the capacity to develop a front end quite easily, using "wtc.stp" as template and enabling you to select and modify the settings you require in the active settings file (or registry).

 

Whatever program you use, when you select change/review settings, WTC calls that program and passes "wtc.wtc" and "wtc.stp" to it as command line parameters, in that order. If you are opening with a plain text editor that supports opening more than one file (like TSE Pro), you now have both the settings file and the default configuration file open together, so you can use the latter for reference as you work on the former. If your editor only supports one file at a time (like Windows Notepad), the active settings file opens.

 

Because the settings file and default configuration file are plain text, they can be managed totally independently of WTC, such as through windows Explorer. This is true of all WTC support files.

 


Page url: http://wtcmanual.wintextware.com/index.html?m_opening_the_settings_file.htm