⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 faxmail.tcl

📁 使用Mail发送传真的程序
💻 TCL
📖 第 1 页 / 共 5 页
字号:
#!/usr/bin/wish -f# FaxMail lets you send faxes for free via email.  See http://www.tpc.int/# Copyright (C) 1996, 1997, 1998 David Burns, Shyamal Somaroo, Matthew Davey.# This program is free software; you can redistribute it and/or# modify it under the terms of the GNU General Public License# as published by the Free Software Foundation; either version 2# of the License, or (at your option) any later version.# This program is distributed in the hope that it will be useful,# but WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the# GNU General Public License for more details.# You should have received a copy of the GNU General Public License# along with this program; if not, write to the Free Software# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.# Program: FaxMail# Tcl version: 7.5 (Tcl/Tk/XF)# Tk version: 4.1# XF version: 4.0# FaxMail is based on the faxtool program written by David Burns and# Shyamal Somaroo.  Faxtool became FaxMail in 1997 when the address book# and postscript file browser were added by Matthew Davey, the name was# changed to avoid a clash with a different package.# Maintained by  Matt Davey at mcdavey@@mrao.cam.ac.uk.if {$tk_version < 4.0} {    puts stderr "\nSorry: wrong TK version: need at least 4.0\n"    destroy .}if {[info exists tcl_platform]} {    if {$tcl_platform(platform) != "unix"} {	puts stderr " Sorry, FaxMail is a UNIX program.  \n\		Try checking out http://www-usa.tpc.int/clients.html"         destroy .    }}# procedure to show window ShowWindow.addressproc ShowWindow.address { args} {# build widget .address  catch "destroy .address"  toplevel .address   -relief {raised}  # Window manager configurations  wm positionfrom .address program  wm sizefrom .address program  wm maxsize .address 1000 1000  wm minsize .address 10 10  wm protocol .address WM_DELETE_WINDOW {addr_close}  wm title .address {FaxMail Address Book}  # build widget .address.frame11  frame .address.frame11  -borderwidth {2}  -height {30}  -relief {raised}  -width {30}  # build widget .address.frame11.country  label .address.frame11.country  -text {COUNTRY CODE:}  # build widget .address.frame11.local  label .address.frame11.local  -text {LOCAL CODE:}  # build widget .address.frame11.number  label .address.frame11.number  -text {FAX NUMBER:}  # build widget .address.frame11.recipient  label .address.frame11.recipient  -foreground {black}  -text {RECIPIENT'S NAME:}  # build widget .address.frame11.org  label .address.frame11.org  -text {ORGANISATION:}  # build widget .address.frame11.email  label .address.frame11.email  -text {EMAIL:}  # build widget .address.frame11.entry23  entry .address.frame11.entry23  -width {4}  # bindings  bind .address.frame11.entry23 <FocusIn> {set addr_book(modified) 1}  # build widget .address.frame11.entry24  entry .address.frame11.entry24 -width {4}  # bindings  bind .address.frame11.entry24 <FocusIn> {set addr_book(modified) 1}  # build widget .address.frame11.entry25  entry .address.frame11.entry25 -width {30}  # bindings  bind .address.frame11.entry25 <FocusIn> {set addr_book(modified) 1}  # build widget .address.frame11.entry26  entry .address.frame11.entry26 -width {30}  bind .address.frame11.entry26 <FocusIn> {set addr_book(modified) 1}  # build widget .address.frame11.entry27  entry .address.frame11.entry27 -width {30}  bind .address.frame11.entry27 <FocusIn> {set addr_book(modified) 1}  # build widget .address.frame11.entry28  entry .address.frame11.entry28 -width {30}  # bindings  bind .address.frame11.entry28 <FocusIn> {set addr_book(modified) 1}  # build widget .address.frame11.addr_buttons  frame .address.frame11.addr_buttons  -borderwidth {2}  # build widget .address.frame11.addr_buttons.button32  button .address.frame11.addr_buttons.button32  -command {addr_clear}  -foreground {Blue}  -padx {9}  -pady {3}  -text {CLEAR}  # build widget .address.frame11.addr_title_frame  frame .address.frame11.addr_title_frame  # build widget .address.frame11.addr_title_frame.label1  label .address.frame11.addr_title_frame.label1  -text {Alias:}  # build widget .address.frame11.addr_title_frame.alias  message .address.frame11.addr_title_frame.alias  -aspect {1500}  -padx {5}  -pady {2}  # build widget .address.frame12  frame .address.frame12  -borderwidth {2}  -height {30}  -relief {raised}  -width {30}  # build widget .address.frame12.frame  frame .address.frame12.frame  # build widget .address.frame12.frame.scrollbar3  scrollbar .address.frame12.frame.scrollbar3  -command {.address.frame12.frame.listbox1 xview}  -orient {horizontal}  -relief {raised}  # build widget .address.frame12.frame.scrollbar2  scrollbar .address.frame12.frame.scrollbar2  -command {.address.frame12.frame.listbox1 yview}  -relief {raised}  # build widget .address.frame12.frame.listbox1  listbox .address.frame12.frame.listbox1  -exportselection {0}  -relief {raised}  -xscrollcommand {.address.frame12.frame.scrollbar3 set}  -yscrollcommand {.address.frame12.frame.scrollbar2 set}  # bindings  bind .address.frame12.frame.listbox1 <B1-Motion> {%W select anchor [%W nearest %y]}  bind .address.frame12.frame.listbox1 <ButtonRelease-1> {addr_set}  bind .address.frame12.frame.listbox1 <Shift-B1-Motion> {%W select anchor [%W nearest %y]}  bind .address.frame12.frame.listbox1 <Shift-Button-1> {%W select anchor [%W nearest %y]}  # build widget .address.frame12.buttons  frame .address.frame12.buttons  -borderwidth {2}  # build widget .address.frame12.buttons.new  button .address.frame12.buttons.new  -command {addr_new}  -foreground {Blue}  -padx {9}  -pady {3}  -text {NEW}  # build widget .address.frame12.buttons.button6  button .address.frame12.buttons.button6  -command {addr_delete}  -foreground {Blue}  -padx {9}  -pady {3}  -text {DELETE}  # build widget .address.frame12.buttons.select  button .address.frame12.buttons.select  -command {addr_name}  -foreground {Blue}  -padx {9}  -pady {3}  -text {RENAME}  # build widget .address.frame12.buttons.close  button .address.frame12.buttons.close  -command {addr_close}  -foreground {Red}  -padx {9}  -pady {3}  -text {CLOSE}  # build widget .address.frame12.buttons.use  button .address.frame12.buttons.use  -command {addr_select}  -foreground {Blue}  -padx {9}  -pady {3}  -text {USE}  # build widget .address.frame12.title  label .address.frame12.title  -text {Entries in address book:}  # pack master .address.frame11  pack configure .address.frame11.addr_title_frame  -expand 1  -fill x  pack configure .address.frame11.country  -anchor w  pack configure .address.frame11.entry23  -anchor w  pack configure .address.frame11.local  -anchor w  pack configure .address.frame11.entry24  -anchor w  pack configure .address.frame11.number  -anchor w  pack configure .address.frame11.entry25  -anchor w  pack configure .address.frame11.recipient  -anchor w  pack configure .address.frame11.entry26  -anchor w  pack configure .address.frame11.org  -anchor w  pack configure .address.frame11.entry27  -anchor w  pack configure .address.frame11.email  -anchor w  pack configure .address.frame11.entry28  -anchor w  pack configure .address.frame11.addr_buttons  # pack master .address.frame11.addr_buttons  pack configure .address.frame11.addr_buttons.button32  -side left  # pack master .address.frame11.addr_title_frame  pack configure .address.frame11.addr_title_frame.label1  -anchor w  -side left  pack configure .address.frame11.addr_title_frame.alias  -side left  # pack master .address.frame12  pack configure .address.frame12.title  -anchor w  pack configure .address.frame12.frame  -expand 1  -fill both  pack configure .address.frame12.buttons  -side bottom  # pack master .address.frame12.frame  pack configure .address.frame12.frame.scrollbar2  -fill y  -side left  pack configure .address.frame12.frame.listbox1  -expand 1  -fill both  pack configure .address.frame12.frame.scrollbar3  -fill x  -side bottom  # pack master .address.frame12.buttons  pack configure .address.frame12.buttons.new  -side left  pack configure .address.frame12.buttons.button6  -side left  pack configure .address.frame12.buttons.select  -side left  pack configure .address.frame12.buttons.use  -side left  pack configure .address.frame12.buttons.close  -side left  # pack master .address  pack configure .address.frame12  -anchor s  -expand 1  -fill both  -side left  pack configure .address.frame11  -expand 1  -fill both}proc DestroyWindow.address {} {# xf ignore me 7    catch "destroy .address"    update}# procedure to show window ShowWindow.entryproc ShowWindow.entry { args} {  # build widget .entry    catch "destroy .entry"  toplevel .entry   -relief {raised}  # Window manager configurations  wm positionfrom .entry ""  wm sizefrom .entry ""  wm maxsize .entry 1265 994  wm minsize .entry 1 1  wm title .entry {FaxMail: entry}  # build widget .entry.m  message .entry.m  -aspect {1500}  -padx {5}  -pady {2}  -text {Enter alias name:}  # build widget .entry.entry  entry .entry.entry  -textvariable {prompt(result)}  # bindings  bind .entry.entry <Key-Return> {set prompt(ok) 1}  # build widget .entry.b1  button .entry.b1  -command {set prompt(ok) 1}  -padx {9}  -pady {3}  -text {OK}  # build widget .entry.b2  button .entry.b2  -command {set prompt(ok) 0}  -padx {9}  -pady {3}  -text {CANCEL}  # pack master .entry  pack configure .entry.m  pack configure .entry.entry  pack configure .entry.b1  -anchor s  -side left  pack configure .entry.b2  -anchor s  -side right}proc DestroyWindow.entry {} {# xf ignore me 7    catch "destroy .entry"    update}# procedure to show window ShowWindow.yesnoproc ShowWindow.yesno { args} {  # build widget .yesno    catch "destroy .yesno"  toplevel .yesno   -relief {raised}  # Window manager configurations  wm positionfrom .yesno ""  wm sizefrom .yesno user  wm maxsize .yesno 1265 994  wm minsize .yesno 1 1  wm title .yesno {FaxMail: dialogue}  # build widget .yesno.message  message .yesno.message  -aspect {1500}  -foreground {red}  -padx {5}  -pady {2}  -text {Save changes to address book?}  # build widget .yesno.yes  button .yesno.yes  -command {global yesnoset yesno(result) "yes"destroy .yesno}  -padx {9}  -pady {3}  -text {YES}  # build widget .yesno.no  button .yesno.no  -command {global yesnoset yesno(result) "no"destroy .yesno}  -padx {9}  -pady {3}  -text {NO}  # pack master .yesno  pack configure .yesno.message  pack configure .yesno.yes  -anchor w  -padx 3  -pady 4  -side left  pack configure .yesno.no  -anchor e  -padx 12  -pady 12  -side right}proc DestroyWindow.yesno {} {# xf ignore me 7    catch "destroy .yesno"    update}# procedure to show window .proc ShowWindow. {args} {# xf ignore me 7  global images  # Window manager configurations  wm positionfrom . ""  wm sizefrom . user  wm maxsize . 1265 994  wm minsize . 1 1  wm protocol . WM_DELETE_WINDOW {XFProcError {Application windows can not be destroyed.Please use the "Current widget path:" to show/hide windows.}}  wm title . {FaxMail-2.3}  # build widget .b  frame .b  # build widget .b.b1  button .b.b1 \	  -command {fax} \	  -foreground {blue} \	  -padx {9} \	  -pady {3} \	  -text {FAX}    # build widget .b.b4  button .b.b4 \	  -command {clear} \	  -foreground {blue} \	  -padx {9} \	  -pady {3} \	  -text {RESET}    # build widget .b.b3  button .b.b3 \	  -command {preferences} \	  -foreground {blue} \	  -padx {9} \	  -pady {3} \	  -text {PERSONAL}    # build widget .b.b6  button .b.b6 \	  -command {coverage} \	  -foreground {blue} \	  -padx {9} \	  -pady {3} \	  -text {COVERAGE}    # build widget .b.b5  button .b.b5 \	  -command {about} \	  -foreground {blue} \	  -padx {9} \	  -pady {3} \	  -text {ABOUT}    # build widget .b.b7  button .b.b7 \	  -command {addresses} \	  -foreground {blue} \	  -padx {9} \	  -pady {3} \	  -text {ADDRESSES}    # build widget .b.b2  button .b.b2 \	  -command {quit} \	  -foreground {Red} \	  -padx {9} \	  -pady {3} \	  -text {QUIT}  # build widget .www  frame .www  # build widget .www.label9  label .www.label9 \    -text {SUBJECT:}  # build widget .www.entry16  entry .www.entry16 \    -textvariable {recipient(subject)} \    -width {70}  # build widget .p  frame .p  frame .p.list#  scrollbar .p.list.sx  -command {.p.list.box xview}  -orient {horizontal}  -relief {raised}  scrollbar .p.list.sy  -command {.p.list.box yview}  -relief {raised}#  listbox .p.list.box  -height 3 -width 46 -exportselection {0}  -relief {raised}  -xscrollcommand {.p.list.sx set}  -yscrollcommand {.p.list.sy set}  listbox .p.list.box  -height 3 -width 46 -exportselection {0}  -relief {raised}  -yscrollcommand {.p.list.sy set}  frame .p.buttons  -borderwidth {2}  # build widget .address.frame12.buttons.button6  button .p.buttons.del  -command {.p.list.box delete active}  -foreground {Blue}  -padx {9}  -pady {3}  -text {DELETE}  # build widget .p.label1  label .p.label1 \    -text {FILES TO INCLUDE:}  # build widget .p.button0  menubutton .p.buttons.add \    -menu .p.buttons.add.menu0 \    -padx {9} \    -pady {3} \    -foreground {Blue} \    -relief raised \    -text {ADD}  # build file add menu  menu .p.buttons.add.menu0 -tearoff 0  .p.buttons.add.menu0 add command \    -command {file_add "(postscript)" "ps"} \    -foreground {Blue} \    -label {Postscript}  .p.buttons.add.menu0 add command \    -command {file_add "(plain text)" "*" } \    -foreground {Blue} \    -label {Plain text}  if { $images } {  .p.buttons.add.menu0 add command \    -command {file_add "(image)" "*"} \    -foreground {Blue} \

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -