Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Executing commands on program start

Status
Not open for further replies.

riotxix

Programmer
Dec 29, 2006
1
GB
Hi, I'm new to TCL - I wrote the bulk of the script in 5 minutes, and have spent over an hour searching for the answer to something simple - I'm quite frustrated now.

Ok...
#!/usr/bin/wish -f

button .b -text "Monitor off in 20s" -command {exit}
pack.b

BUT, all I want to do is run the commands
sleep 20s
xset dpms off
exit

while the window is displayed..

so the script exits after 20s switching the monitor off with it. I just can't find a solution on how to do this WHILE the window box . is present - please help.
 
perhaps
after 2000 "exec xset dpms off" exit


_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top