Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Change printer in script

165 views
Skip to first unread message

Christoph Kaufmann

unread,
Oct 5, 2011, 2:39:24 PM10/5/11
to
FMP 10 and FMS 10 running on some Windows/Citrix system: I'd like to set
paper size and page direction without setting a specific printer, the
user's default printer is just fine.

It seems I need the setup printer script step which will always set a
printer.

I surrendered and put codes for the printers into the user table. Tried
to set the printer with scripts (one script per printer). Turned out
that doesn't work - setting the print setup script step does actually
set up the printer for the file and changes all the other print setup
script steps in the file.

Solutions? Recommended plugins?

--
http://clk.ch

Your Name

unread,
Oct 6, 2011, 8:13:48 PM10/6/11
to
In article <1k8omf1.1pu5lcm1ivty0wN%clkau...@gmx.ch>, clkau...@gmx.ch
Under Mac OS X you can choose "Any Printer" as an option which would
probably solve this problem, but I don't know if there's a similar option
in newer versions of Windows.

FileMaker Print Setup command does remember the set-ups for different
printers at the same time, so I think the only other option would be to
display the Print Set-up window every time for the user choose the
printer.

There are a few Printer related plug-ins around, but I plug-ons are
usually expensive so I don't use them and don't know if any do what you
need.

Helpful Harry :o)

cortical

unread,
Oct 10, 2011, 7:40:52 PM10/10/11
to

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

Christoph Kaufmann

unread,
Oct 12, 2011, 12:40:58 PM10/12/11
to
Your Name <your...@yourisp.com> wrote:

> Under Mac OS X you can choose "Any Printer" as an option which would
> probably solve this problem, but I don't know if there's a similar option
> in newer versions of Windows.

There isn't :-(


--
http://clk.ch
0 new messages