Changing it to just exit instead of exit(0) didn't change anything. I actually changed it from exit to exit(0) to test it, but that didn't seem to matter.

Do you want to see a screenshot of tksurfer or output from the shell script?


On Wed, Aug 14, 2013 at 2:24 PM, Bruce Fischl <fischl@nmr.mgh.harvard.edu> wrote:
can you send us the screen output? Try using just exit (instead of exit(0))


On Wed, 14 Aug 2013, Greg Book wrote:

I have a bash script which calls a .tcl script through which I'm running
tksurfer. It works, except the script is no longer exiting when it reaches the
end. Instead, it displays the tksurfer window and stays open. After I click the
menu option to Quit, the script continues.
Below is the script

open_window

set lablpth "$env(SUBJECTS_DIR)/$env(SUBJECT_NAME)/label"
set outpth "$env(SUBJECTS_DIR)/$env(SUBJECT_NAME)/shots"

labl_import_annotation "$lablpth/$hemi.$env(PARC).annot"
redraw
UpdateAndRedraw

puts "Taking Snapshots..."

if {![file exists
"$outpth/$env(SUBJECT_NAME)_${hemi}_$env(SURF)_$env(PARC)_lat.tif"]} {
make_lateral_view
redraw
set tiff "$outpth/$env(SUBJECT_NAME)_${hemi}_$env(SURF)_$env(PARC)_lat.tif"
save_tiff $tiff
}

if {![file exists
"$outpth/$env(SUBJECT_NAME)_${hemi}_$env(SURF)_$env(PARC)_med.tif"]} {
make_lateral_view
rotate_brain_y 180
redraw
set tiff "$outpth/$env(SUBJECT_NAME)_${hemi}_$env(SURF)_$env(PARC)_med.tif"
save_tiff $tiff
}

exit(0)




The information in this e-mail is intended only for the person to whom it is
addressed. If you believe this e-mail was sent to you in error and the e-mail
contains patient information, please contact the Partners Compliance HelpLine at
http://www.partners.org/complianceline . If the e-mail was sent to you in error
but does not contain patient information, please contact the sender and properly
dispose of the e-mail.