Posted to junk by kostix at Thu Nov 30 11:26:22 GMT 2006view pretty

#! /usr/bin/wish

package require Tk

foreach x {start stop} {
	pack [button .$x -text $x -command $x] -side left
}

proc start {} {
	global id env

	exec [file join $env(windir) system32 notepad.exe] &
	set id [after 3000 start]
}

proc stop {} {
	global id

	after cancel $id
}