I'm looking for a way in tcl to pause the script (for example after some outputs with "puts") and wait for a key pressed from the user before continuing to output the remaining text.
You just use gets
to read from stdin:
proc pause {{message "Hit Enter to continue ==> "}} {
puts -nonewline $message
flush stdout
gets stdin
}
pause "Hurry, hit enter: "; # Sample usage 1
pause; # Sample usage 2, use default message