proc stopScript {} {

#$Header: /home/cvsroot/tcldb/ucodb/Tlib/stopScript,v 1.1 1998/12/16 21:45:43 de Exp $

	global UserCmd lfp CmdRing CmdPtr LastPtr 
	global errorCode errorInfo Script

	set Script 0

	foreach a [after info] {
		after cancel $a
	}

	mkMsg "Script Interrupted!"

	set t .scriptEdit.top.txt

	set err [catch {$t configure -background yellow} res]

	if {!$err} {
		update idletasks
		after 250
		set err [catch {$t configure -background ivory} res]
		update idletasks
		set err [catch {$t configure -foreground black} res]
	} else {
		puts stderr "OUCH no such widget $t"
		puts stderr "stopScript is confused"
	}

}
