#!$(GISBASE)/etc/nviz2.2/NVWISH2.2 -f
# This file handles script playing events by sourcing
# the selected script file.  Within the script file,
# "send" commands are used to actually send the events
# to nviz.  Note that by changing the variable ProcessName
# the events may be rerouted to a different nviz process.
# Also, this version of nviz is fairly insecure as it uses
# insecure sends.

catch {destroy .wait_ok}

global src_boot

source $src_boot/etc/nviz2.2-i18n/scripts/config.tcl
wm title . [_ "script_play"]

# Globals
# ProcessName now defined in config.tcl
#global ProcessName

# If the script option is used, then use that name for the script file,
# otherwise query the user for a script.
if {[catch {set NvizPlayScript}] == 0} then {
    global NvizPlayScript
    set new_file "$NvizPlayScript"
} else {
    set new_file [create_file_browser .script_file_browser 1 1]
    if {$new_file == -1} then {
	exit
    }
}

wm withdraw .

source $new_file

exit







