summaryrefslogtreecommitdiffstats
path: root/doc/registry.n
diff options
context:
space:
mode:
Diffstat (limited to 'doc/registry.n')
-rw-r--r--doc/registry.n21
1 files changed, 18 insertions, 3 deletions
diff --git a/doc/registry.n b/doc/registry.n
index e6a4902..549a2e1 100644
--- a/doc/registry.n
+++ b/doc/registry.n
@@ -5,7 +5,7 @@
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\"
-'\" RCS: @(#) $Id: registry.n,v 1.8 2002/10/19 01:48:46 hobbs Exp $
+'\" RCS: @(#) $Id: registry.n,v 1.8.2.1 2004/10/27 14:23:58 dkf Exp $
'\"
.so man.macros
.TH registry n 1.1 registry "Tcl Bundled Packages"
@@ -60,7 +60,7 @@ keys like Environment. The timeout specifies the amount of time, in
milliseconds, to wait for applications to respond to the broadcast message.
It defaults to 3000. The following example demonstrates how to add a path
to the global Environment and notify applications of the change without
-reguiring a logoff/logon step (assumes admin privileges):
+requiring a logoff/logon step (assumes admin privileges):
.CS
set regPath {HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment}
set curPath [registry get $regPath "Path"]
@@ -179,9 +179,24 @@ In addition to the symbolically named types listed above, unknown
types are identified using a 32-bit integer that corresponds to the
type code returned by the system interfaces. In this case, the data
is represented exactly in Tcl, including any embedded nulls.
-
.SH "PORTABILITY ISSUES"
The registry command is only available on Windows.
+.SH EXAMPLE
+Print out how double-clicking on a Tcl script file will invoke a Tcl
+interpreter:
+.CS
+package require registry
+set ext .tcl
+
+# Read the type name
+set type [\fBregistry get\fR HKEY_CLASSES_ROOT\e\e$ext {}]
+# Work out where to look for the command
+set path HKEY_CLASSES_ROOT\e\e$type\e\eShell\e\eOpen\e\ecommand
+# Read the command!
+set command [\fBregistry get\fR $path {}]
+
+puts "$ext opens with $command"
+.CE
.SH KEYWORDS
registry