Various TWAPI ancillary commands
package require twapi
This module provides miscellaneous utility commands.
get_version returns TWAPI version information. parseargs parses an argument list based on specified options. get_command_line retrieves the command line passed to the process. get_command_line_args parses a command line using Windows conventions. The command expand_environment_strings replaces environment variables in a string with their values. format_message formats a operating system or application message.
-module MODULE | Specifies that the format string is to be loaded from the module identified by MODULE. MODULE may either be a handle returned from a command such as load_library or the path to a DLL. If this option is specified, options -messageid and -langid must also be specified. This option cannot be used with the -fmtstring option. |
-fmtstring FORMATSTRING | Specifies that FORMATSTRING should be used as the format string for the message. Cannot be used with the -module option. |
-messageid MESSAGEID | Specifies the message identifier of the format string. This option cannot be used with the -fmtstring option. |
-langid LANGID | Specifies the language identifier to be used in constructing the message. This option cannot be used with the -fmtstring option. |
-includesystem | Specifies that the system message tables should also be searched in addition to the message tables in the module specified by -module. This option cannot be used with the -fmtstring option. |
-params PARAMLIST | Specifies a list of positional parameters that are to be used to replace the %N format insert sequences in the format string. If the number of parameters does not match the number of escape sequences, a Tcl exception may be generated unless the -ignoreinserterrors is specified. |
-ignoreinserterrors | Normally, a Tcl exception is raised if the number of parameters specified through the -params option does not match the %N specifiers in the format string. If this option is specified, instead of generating an exception, the command behaves as though -ignoreinserts was specified. |
-ignoreinserts | If specified, the %N format insert sequences are not replaced in the returned string. |
-width MAXLINEWIDTH | By default, the returned string contains the same line breaks as in the original format string. The -width option may be used to control the maximum line width in the created message. If MAXLINEWIDTH is between 1 and 255, the command will insert line end characters at appropriate points in the message. In this case, line end characters in the original message are ignored. However, hard coded line end characters, specified as %n in the format string are kept. A negative value of MAXLINEWIDTH also ignores line end characters while keeping the hard coded %n line end specifiers, but does not insert and line end characters to limit the line length. A value of 0 for MAXLINEWIDTH is identical to the default behaviour. |
Copyright © 2004-2007 Ashok P. Nadkarni