To avoid the last mentioned
<<changes all the other print setup script steps in the file.>>
reset setup and printer to the default at the end of each script; or use
a single called subscript to centralize all printing ( much easier to
manage once integrated).
I use a single subscript for printing and 3 script parameters
( and a separate subscript for label printing)
SP example : radiology|portrait|current
this sturcture works for different deartments on teh same LAN ( and
hence defualt local printers), and the first SP controls different trays
on a given printer.
The fly(s) in the ointment can be the print queues; set them from FM
logged in to the LAN. The other aspect is the IT setup of the print
queues ( which turned out to be the source of initial problems - i.e
complete failure to work)
In FM, reset to the default as last step; to avoid issues with any print
steps in scripts not yet using the subscript.
Sequences include a conditional ( # If [ (Get ( AccountName ) = "****"
)) for admin/dev to halt the script at the print page for testing purposes
Works across several departments, 20-30 workstations, 3 P'sets and 20+
accounts
CONTROL VARIABLES
#SP format: fn | [P, L] | [current, all]
Set Variable [ $_fn; Value:getSP_n ( 1 ) ]
Set Variable [ $_q; Value:getSP_n ( 2 ) ]
Set Variable [ $_n; Value:getSP_n ( 3 ) ]
#
#
#
Show/Hide Status Area
[ Hide ] Adjust Window
[ Resize to Fit ]
#
Set Error Capture [ On ]
#DEFAULT = PORTRAIT
#PAGE SETUP = ANY PRINTER - A4 - PORTRAIT
If [ $_q = "L" ]
#LANDSCAPE
Print Setup [ Orientation: Landscape; Paper size: 8.26" x 11.69"
][Restore; No dialog ]
Else
#PORTRAIT
Print Setup [ Orientation: Portrait; Paper size: 8.26" x 11.69" ] [
Restore; No dialog ]
End If
#
Enter Preview Mode
Adjust Window
[ Resize to Fit ]
Enter Preview Mode
#
# #====================================================
#TRAY
#====================================================
#PRINT ANY PRINTER, CURRENT RECORD ONLY
If [ $_fn = "biochemistry" ]
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper
size: 8.26" x 11.69" ] [ Restore: RICOH Aficio SP 4210N [0EE6A8] ]
#PAPER FEED = TRAY 2
Else If [ $_fn = "radiology" ]
#PAPER FEED = TRAY 1
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper
size: 8.5" x 11" ] [ Restore: RICOH Aficio SP 4210N [0EE6A8] ]
// Else
End If
#
#
#====================================================
#PAGE SETUP
#====================================================
#DEFAULT = PORTRAIT
#PAGE SETUP = ANY PRINTER - A4 - PORTRAIT
If [ $_q = "L" ]
#LANDSCAPE
Print Setup [ Orientation: Landscape; Paper size: 8.26" x 11.69" ] [
Restore; No dialog ]
Else If [ $_q = "p" ]
#PORTRAIT
Print Setup [ Orientation: Portrait; Paper size: 8.26" x 11.69" ] [
Restore; No dialog ]
Else
#PORTRAIT
Print Setup [ Orientation: Portrait; Paper size: 8.26" x 11.69" ] [
Restore; No dialog ]
End If
#
#
# If [ (Get ( AccountName ) = "****" ) and ( Get ( ActiveModifierKeys )
= 8) ]
Halt Script
End If
#
#====================================================
#PRINT (RECORDS)
#====================================================
#ALL OTHER PRINTING
If [ $_n = "rbb" ]
#RECORDS BEING BROWSED
Print [ Records being browsed; All Pages; Orientation: Portrait; Paper
size: 8.26" x 11.69" ] [ Restore: ###.###.#.## ]
Else If [ $_n = "current" ]
#CURRENT RECORD
Print [ Current record; All Pages; Orientation: Portrait; Paper size:
8.26" x 11.69" ] [ Restore: ###.###.#.## ]
Else
#CURRENT RECORD
Print [ Current record; All Pages; Orientation: Portrait; Paper size:
8.26" x 11.69" ] [ Restore: ###.###.#.## ]
End If
#
#
#
#TRAP FOR USER CANCEL
If[Get(LastError) =1]
Close Window [ Name: $_window_name; Current file ]
End If
#
#
# #Reset page setup = ANY PRINTER - A4 - PORTRAIT - NO DIALOGUE
Print Setup [ Orientation: Portrait; Paper size: 8.26" x 11.69" ]
[ Restore; No dialog ]
Enter Browse Mode
Chris