Posted to tcl by rjhobart at Thu Dec 26 16:08:37 GMT 2019view raw

  1. #!/usr/bin/env tclsh
  2. package require Tk
  3.  
  4. #.... more code ....
  5.  
  6. proc creategui {} {
  7. wm title . "PrePressActions"
  8. menu .mbar
  9. . configure -menu .mbar
  10.  
  11. #create file on main menu
  12. .mbar add cascade -label Converting -menu .mbar.file -underline 0
  13. menu .mbar.file
  14. # Create the menu items under File - now called by label Negatives
  15. .mbar.file add cascade -label {Open PDF,EPS,PS and Separate to tiffs... Ctl-p} -menu .mbar.file.open -underline 0 \
  16. -command {openPDFtoTiff}
  17.  
  18. # more menu setups ......
  19. # Throws error HERE on linux debian but works perfect on macs.
  20. # invalid command name ".mbar.file.open"
  21. # invoked from within ".#mbar.#mbar#file postcascade active
  22.  
  23. # bind short cut keys for the menu
  24. bind . <Control-p> {openPDFtoTiff}
  25. bind . <Command-p> {openPDFtoTiff}
  26. }
  27. creategui