Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
Printer.PrinterName
Queries the name of the printer with given index.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| Printer | 3.0 | Yes | Yes | No | Yes | No |
Parameters
| Parameter | Description | Example |
|---|---|---|
| index | The index of the printer. From 0 to PrinterCount-1. | 0 |
Result
Returns name of printer or error.
Description
Queries the name of the printer with given index.Examples
Queries name of first printer:
$name = MBS( "Printer.PrinterName"; 0 )
Query list of all printers with While loop:
Let ( [
count = MBS( "Printer.PrinterCount" );
list = While (
[
l = "";
i = 0
];
i < count ;
[
l = l & MBS( "Printer.PrinterName"; i ) & ¶;
i = i + 1
] ; l )
]; list )
Create records from printer list:
# List printers in file Printers
Delete All Records [ With dialog: Off ]
Set Variable [ $count ; Value: MBS( "Printer.PrinterCount" ) ]
If [ $count > 0 ]
Set Variable [ $index ; Value: 0 ]
Loop
New Record/Request
Set Variable [ $name ; Value: MBS( "Printer.PrinterName"; $index ) ]
Set Field [ Printers::Printer Name ; $name ]
#
Commit Records/Requests [ With dialog: Off ]
#
Set Variable [ $index ; Value: $index + 1 ]
Exit Loop If [ $index ≥ $count ]
End Loop
End If
See also
- DynaPDF.Print
- Printer.PaperFormats
- Printer.PaperSources
- Printer.Print
- Printer.PrinterCount
- Printer.PrinterInfo
- Printer.PrinterNames
Example Databases
Blog Entries
FileMaker Magazin
Release notes
- Version 9.0
- Improved out of bounds error message for Menu.InsertItem, Menu.RemoveItemAtIndex, Calendar.Item.GetAttendeeURL, Calendar.Item.GetAttendeeCommonName, Calendar.Item.GetAttendeeStatus, Printer.PrinterName and CLGeocoder.PlacemarkValue.
Created 18th August 2014, last changed 3th October 2020
Printer.PrinterInfo - Printer.PrinterNames
Feedback: Report problem or ask question.
Links
MBS Xojo Plugins