DeskJet 840c Print envelope script info. (Tex-Edit)
DeskJet 840c Print envelope script info. (Tex-Edit)
- Subject: DeskJet 840c Print envelope script info. (Tex-Edit)
- From: Rachel Cogent <email@hidden>
- Date: Sat, 22 Sep 2001 23:14:59 -0600
Tom:
Here is what I figured out about the DeskJet 4.13 driver:
You must make the "Envelope" page setup the DEFAULT or it does not know to
print an envelope.
Upon running the Print Envelope script the "Envelope" Page Setup is reset to
default parameters, which means Letter Portrait.
I have given up using the script. If in the future you get one that works
for this driver please send it to me.
Thank you.
Rachel
http://www.gnarlodious.com
tell application "Tex-Edit Plus"
if (count of windows) = 0 then return
-- be sure to select the address text before invoking script
if selection = "" then
display dialog ,
"Select 1, 2, 3, 4, 5, or 6 lines of text to be used to address
an envelope.
Edit the 'Envelope' stationery pad in the Scripts folder to customize your
return address." buttons {"OK"} ,
default button "OK" with icon note
return
end if
-- check for a reasonable address size
copy (count of lines of selection of window 1) to addressLineCount
if (addressLineCount < 1) or (addressLineCount > 6) then
display dialog "The address selection must consist of 1 to 6 lines."
buttons {"OK"} ,
default button 1 with icon note
return
end if
-- stationery pad hides next to this script, contains all page setup
settings, etc.
open file ":Scripts:Envelope"
-- insert up to five address lines
repeat with i from 1 to 6
set x to "address" & i & return
set y to (text of line i of selection of window 2)
replace window 1 looking for x replacing with y
end repeat
-- print it now and close the window
print window 1
close window 1 saving ask
end tell