run {# 'run' mode always has a MSGID; fetch and process itkeylget args MSGID mhpackage require base64set msg [msgget $mh]fconfigure $msg -translation binaryset encodedPDF [base64::encode [read -nonewline $msg]]lappend new_msg $encodedPDFmsgset $mh $new_msglappend dispList "continue $mh"}
run {# 'run' mode always has a MSGID; fetch and process itkeylget args MSGID mh# add double quotes around filename with spaces#set files [string map {"\x0d\x0a" "\x01"} [msgget $mh]]set files [msgget $mh]set newlist {}foreach f $files {if ![regexp -- {.*\.pdf} $f] {echo Skip $fcontinue}lappend newlist $f}msgset $mh $newlistlappend dispList "CONTINUE $mh"}
run {# 'run' mode always has a MSGID; fetch and process itkeylget args MSGID mhpackage require base64set msg [msgget $mh]echo "This is the Message: $msg"fconfigure $msg -translation binaryset encodedPDF [base64::encode $msg]echo "The encoded PDF is $encodedPDF"lappend new_msg $encodedPDFmsgset $mh $new_msglappend dispList "CONTINUE $mh"}
run {# 'run' mode always has a MSGID; fetch and process itkeylget args MSGID mhpackage require base64set msg [msgget $mh]set filepath {}set drvCtl [msgmetaget $mh DRIVERCTL]keylget drvCtl FILENAME filepathset filename [file rootname [file tail $filepath]]lappend new_msg $filenameset encodedPDF [base64::encode -maxlen 0 $msg]lappend new_msg $encodedPDFmsgset $mh [join $new_msg ","]lappend dispList "CONTINUE $mh"}