Posted to tcl by apn at Thu Jan 16 17:10:33 GMT 2020view raw

  1. # Async proc to download multiple urls, zip and then mail them
  2. # See https://www.magicsplat.com/blog/promise-async/
  3. async zipnmail {dir urls} {
  4. await [download $dir $urls]
  5. await [pexec zip -r pages.zip $dir]
  6. await [pexec blat pages.zip -to someone@somewhere.com]
  7. tk_messageBox -message "Zipped and sent!"
  8. }