Just for fun: Get your daily Dilbert comic and display it. If you provide a directory name as argument, it'll be saved to 'dirname/dilbertyyyymmdd.gif' where yyyymmdd is todays date. ---- package require Tk package require http package require base64 set um [http::geturl http://www.dilbert.com/] set b [split [http::data $um] "\n"] set ln [lsearch -inline -glob $b "*ALT=?Today's Dilbert Comic*"] regexp {^.*IMG SRC=\"([^"]+)\".*$} $ln --> picurl http::cleanup $um set um [http::geturl http://www.unitedmedia.com$picurl] if {$argc && [file isdirectory [lindex $argv 0]]} { set today [clock format [clock seconds] -format "dilbert%Y%m%d.gif"] set fd [open $today w] fconfigure $fd -translation binary -encoding binary puts $fd [http::data $um] close $fd } set pic [base64::encode [http::data $um]] http::cleanup $um image create photo dilbert -data $pic label .l -image dilbert pack .l