pop up a dialog box for the user to select a file to save.
SYNOPSIS
tk_getSaveFile ?option value ...?
DESCRIPTION
The procedure tk_getSaveFile pops up a dialog box for the user to select a file to save. The tk_getSaveFile command is usually associated with the Save as command in the File menu. If the user enters a file that already exists, the dialog box prompts the user for confirmation whether the existing file should be overwritten or not.
caspian: I have used tk_getSaveFile on Windows, and know that it works fine with this operating system. Will it work in a TCL script executed in a UNIX environment?
It works in a Tk script:
package require Tk set a [tk_getSaveFile] puts $a
produces a dialog box for you to specify a file name, with the behavior as mentioned above. Of course, the dialog itself does not write out the file - it only returns the file name for your script to use.
See also:
Category Dialog - Category Command - Tk syntax help - Arts and Crafts of Tcl-Tk Programming