Version 16 of Robert Hicks

Updated 2005-04-01 15:14:41

Also known as RLH

Email: robert -dot- hicks -at- adelphia -dot- net


Things that I will find myself doing with Tcl/Tk:

  • Building a recipe application for my wife (using either SQLite or Metakit)
  • Helping out the Tcl community in any way I can
  • Evangelizing Tcl at work. -- I already have permission to put it everywhere.
  • Creating frontends to a lot of the stuff I do for admin work on (HP and Windows)
  • Creating some Vim plugins...?

Standing offer

If you need something tested on Windows 2000 or Windows XP shoot me an email. I would be glad to help as much as I am able. I am not a -programmer- but I can run anything with instructions. I can go through your docs, I can run test scripts, and stuff like that, so if you need help let me know.

I also run OSX at home now and use the Tcl/Tk Aqua BI distro [L1 ]. So if you need any testing done I can help there as well.


Why did I choose Tcl?

A couple reasons. One reason was that Tcl is easy to learn. I picked up Welch's book [L2 ] a week ago and with help from the c.l.tcl newsgroup [L3 ] I have already created a small tracking application using Metakit. The biggest reason is the people I have exchanged information with in the newsgroup. They were encouraging and super helpful.

Kudos to the those who use Tcl...


Code I would like critiqued

 puts ""
 puts "The POPUPS script is running"
 puts ""

 # If the day is Sunday, get rid of log files
 set theDay [clock format [clock scan now] -format %u]
 set logDir [file join {M:\Program Files\Mincom\ParadoxMaster}]

 if {$theDay == 7} {
     foreach log [glob -nocomplain $logDir/msqupd.log*] {
         puts "Deleting: $log\n"
         file delete -force $log
     }
 }

 # Remove all the users cache directories
 set mimsCache "MIMS Cache"

 foreach cacheDir [glob -nocomplain M:/users/*/Ellipse/temp/$mimsCache] {
     puts "Deleting: $cacheDir\n"
     file delete -force $cacheDir
 } 

 # Run MSQUPD.EXE on all viable districts
 set msqupd [file join {M:\Program Files\Mincom\MIMS Open Enterprise\5.2.3.2\bin\msqupd.exe}]

 foreach district {elldev elldev2 icedev prodev} {
     puts "Now refreshing: $district\n"
     exec $msqupd $district
 }

 proc sendMessage {recipient email_server subject body} {
     package require smtp
     package require mime

     set ::smtp::trf 0 ;# this causes an error, supposedly a fix to Trf is in the works

     set token [mime::initialize -canonical text/plain -string $body]

     mime::setheader $token Subject $subject
     smtp::sendmessage $token -recipients $recipient -servers $email_server
     mime::finalize $token
 }

 set logFile [file join {M:\Program Files\Mincom\ParadoxMaster\msqupd.log}]

 if {[catch {open $logFile r} fileID]} {
     puts "ERROR: $fileID"
     exit
 } else {
     set msgBody [read $fileID]
     close $fileID

     set uname $::env(COMPUTERNAME)
     set subText "Popup Refresh Report"
     set textDate [clock format [clock scan now] -format %Y%m%d]
     set msgSubj "$uname: $subText $textDate"

     sendMessage [email protected] 0.0.0.0 $msgSubj $msgBody ;# this was changed for obvious reasons

     # archive the file
     set suffix [clock format [clock scan now] -format %Y%m%d%H%M%S]
     file rename $logFile $logFile.$suffix

     exit
 }

 # vim: ft=tcl et sw=4 ts=4

[ Category Person ]