Posted to tcl by lunaphyte at Wed Feb 13 21:49:08 GMT 2019view raw
- # send the CID information to an external program
- # Input: $ciddate $cidtime $cidnumber $cidname $cidline $cidtype "" ""
- proc sendCID {cid} {
- global Program
- global ExecSh
- global ModDir
- global WakeUp
- set modcid "$cid"
- # send DATE\nTIME\nNUMBER\nNAME\nLINE\nTYPE\nMESG\nMTYPE\n
- set modtype "using a module"
- set modin "[lindex $cid 0]\n[lindex $cid 1]\n[lindex $cid 2]\n[lindex $cid 3]\n[lindex $cid 4]\n[lindex $cid 5]\n[lindex $cid 6]\n[lindex $cid 7]"
- if $ExecSh {
- catch {exec sh -c $Program << "$modin" >@stdout &} oops
- } else {
- catch {exec $Program << "$modin" >@stdout &} oops
- }
- doVerbose "$modtype\nSent $Program $modcid" 1
- }