home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Windows Shareware GOLD
/
NuclearComputingVol3No1.cdr
/
other
/
f1238
/
psenv.mac
< prev
next >
Wrap
Text File
|
1990-12-25
|
2KB
|
73 lines
Sub MAIN
DisableInput 0
CrLf$ = Chr$(13) + Chr$(10)
Name1$ = "Sender 1"
Name2$ = "Sender 2"
Name3$ = "Sender 1 and Sender 2"
Address1$ = "Your Address Goes Here"
Address2$ = "Your City, State Goes Here"
Begin Dialog UserDialog 370, 144
GroupBox 8, 6, 250, 125, "Choose Name of Sender"
OptionGroup .Sender
OptionButton 16, 30, 250, 18, Name1$
OptionButton 16, 50, 250, 18, Name2$
OptionButton 16, 70, 250, 18, Name3$
OptionButton 16, 90, 250, 18, "None"
OKButton 280, 35, 68, 21
CancelButton 280, 62, 68, 21
End Dialog
Dim dlg As UserDialog
On Error Goto Bye
Dialog dlg
On Error Goto Bye
Select Case dlg.Sender
Case 0
Name$ = Name1$
Case 1
Name$ = Name2$
Case 2
Name$ = Name3$
Case 3
Name$ = " "
End Select
If ExistingBookmark("NameAddress") Then EditGoTo "NameAddress"
If SelType() = 2 Then
VFC = ViewFieldCodes()
If VFC = - 1 Then ViewFieldCodes 0
Address$ = Selection$()
ViewFieldCodes VFC
Else
Address$ = InputBox$("Address:", "PostScript Envelope Printer")
End If
Open "lpt1" For Output As #1
Print #1, "statusdict begin /manualfeed true store end"
Print #1, "/F {findfont exch scalefont setfont} bind def"
Print #1, "/S {show currentpoint exch pop 0 exch 12 sub moveto} bind def"
Print #1, "0 792 translate" + CrLf$ + "-90 rotate"
Print #1, "24 432 translate" + CrLf$ + "0 0 moveto"
Print #1, "12 /Times-Roman F"
If Name$ <> " " Then
Print #1, "(" + Name$ + ") S"
Print #1, "(" + Address1$ + ") S"
Print #1, "(" + Address2$ + ") S"
End If
Print #1, "272 -144 translate" + CrLf$ + "0 0 moveto"
j = 1
For i = 1 To Len(Address$)
Select Case Asc(Mid$(Address$, i))
Case 13, 11
Print #1, "(" + Mid$(Address$, j, i - j) + " ) S"
j = i + 1
Case 10
j = i + 1
Case Else
End Select
Next i
If j < Len(Address$) Then Print #1, "(" + Mid$(Address$, j) + " ) S"
Print #1, "showpage" + CrLf$ + "statusdict begin /manualfeed false store end"
Print #1, Chr$(4) ;
Close
Bye:
End Sub