Topics   All   Mac OS X (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server (Not)   Client   Old   Guides   Examples
New in version: 6.2   6.3   6.4   6.5   7.0   7.1   7.2   7.3   7.4   7.5    Statistic  

Printer.SetPrinter

Switches printer.

Component Version macOS Windows Server FileMaker Cloud FileMaker iOS SDK
Printer 6.5 No Yes No No No

MBS( "Printer.SetPrinter"; Printer { ; CloseDialog } )

Parameters

Parameter Description Example value
Printer The printer name to set.
Must not match exactly, just the first letters.
"Brother"
CloseDialog Optional
Whether to close print dialog.
Pass 1 to close or 0 to not close.
Pass 2 to press cancel button in case you just want to learn the options.
1

Result

Returns OK or error.

Description

Switches printer.
Shows the printer setup dialog and switches target printer.

You can later call Print.ErrorLog to detect errors. If Windows ever change dialogs, features may no longer work.

For Mac, please check PrintDialog.Install function.

Sourcecode sponsored by schubec.com
http://www.schubec.com

Examples

Switch printer:

Set Variable [$r; Value:MBS("Printer.SetPrinter"; Printer Dialog::Printer Name)]
Pause/Resume Script [Duration (seconds): 2]
Show Custom Dialog ["Result"; MBS("Printer.ErrorLog")]

See also

Example Databases


Printer.PrinterNames   -   Process.FrontProcessBundleID

Feedback: Report problem or ask question.




Links
MBS Xojo Plugins