Jump to content

Specifying select print options in scripting


aesquer
 Share

This topic is 3923 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Maybe it's just that I'm still relatively new to FileMaker Pro, or maybe it's just that I've been working on this project for far too long this weekend, but I'm putting together a script that will switch to the printable version of a layout, print the current record only, then go back. As I'm specifying the print options, however, the dialog targets my current printer as well, so when I save the options, the printer name shows up in the script edit window. Normally I wouldn't mind, except that I'm putting together a runtime solution that'll be up for sale. So my question is, is there a way to get FileMaker to acknowledge the print current record only option while ignoring my printer? Or will my printer being named even matter much when end users go to print (will it automatically switch to a default then or what)?

(Thanks in advance for helping a self-admitted rookie on what's probably an easy one to figure out.)

Link to comment
Share on other sites

Open a new window with the current found set, change to the print layout, then select the current record (show all records, omit record, show omitted). Now there is only one record in the current found set so the correct record will preview, and it matters not whether the print dialog prints all records.

Link to comment
Share on other sites

Maybe it's just that I'm still relatively new to FileMaker Pro, or maybe it's just that I've been working on this project for far too long this weekend, but I'm putting together a script that will switch to the printable version of a layout, print the current record only, then go back. As I'm specifying the print options, however, the dialog targets my current printer as well, so when I save the options, the printer name shows up in the script edit window. Normally I wouldn't mind, except that I'm putting together a runtime solution that'll be up for sale. So my question is, is there a way to get FileMaker to acknowledge the print current record only option while ignoring my printer? Or will my printer being named even matter much when end users go to print (will it automatically switch to a default then or what)?

(Thanks in advance for helping a self-admitted rookie on what's probably an easy one to figure out.)

If you don't specify or hard code a printer, the Default printer will automatically be used.

RW

Link to comment
Share on other sites

Vaughan— If I do that, how would I go about returning to the previously found set after printing?

Rick— How do I avoid specifying/hardcoding a printer? In the dialog, I can't not select anything, so just because I want to select the other option, the script setting seems to commit itself to my printer when I save the settings.

Link to comment
Share on other sites

  • 3 weeks later...

1. Close the window that was opened for the printing

2. The "Print Setup" has an option for ANY PRINTER

Sorry to leave a thread unresolved… this is a big project for me, but I only get so much time to actually work on it.

Regarding 1: Okay, I got it. I was under the misconception that the found set is more of a global concept, where one found set would update in each open window.

Regarding 2: I've got that option selected for one step, but in the runtime, there's a button to print a blank copy of the form, in which case I'm using the "Print" script step, and that's where my concern is. No "Any Printer" option there.

Link to comment
Share on other sites

  • 5 months later...

in the runtime, there's a button to print a blank copy of the form, in which case I'm using the "Print" script step, and that's where my concern is. No "Any Printer" option there.

I'm curious about this too. I really don't want my script to save print settings for any specific printer, and I'm concerned that by FileMaker saving the name of my current printer in there, it's saving specific printer information which I would much rather keep generic.

From FileMaker 11.0v3 help:

Select Specify print options or click Specify to specify an output destination. When the script executes, the output from this script step is sent to the printer or fax you specified.

Mac OS: As an alternative to specifying a printer or fax, you can:

• Click PDF in the Print dialog box, then choose a PDF option from the list or choose Edit menu to define a custom PDF output format or destination

• Click Preview in the Print dialog box to specify that the output of the script opens in the user’s default print preview application

If you do not specify an output destination before saving the script or if the specified printer cannot be found when the script executes, the output from the script step is sent to the user’s default printer.

• When you use more than one Print script step in a script, the saved printer name applies to only the containing Print script step.

• A printer name specified in a Print Setup script step is not inherited by any Print script step in a script.

• Mac OS: If a FileMaker Pro 9 (or earlier) file contains a script with Print Script [restore; no dialog], the output goes to the default OS printer when you run the script in a later version of FileMaker Pro (for example, FileMaker Pro 10 or 11). You can recreate print scripts in the later version if you want to change the printer.

It seems to me that FileMaker has started to support dynamic printer switching, which I'm VERY interested in. I'll be playing with this over the next week.

Link to comment
Share on other sites

  • 3 months later...

I'm curious about this too. I really don't want my script to save print settings for any specific printer, and I'm concerned that by FileMaker saving the name of my current printer in there, it's saving specific printer information which I would much rather keep generic.

From FileMaker 11.0v3 help:

It seems to me that FileMaker has started to support dynamic printer switching, which I'm VERY interested in. I'll be playing with this over the next week.

FileMaker is not beginning to support dynamic printer switching. I have developed a method to assign printers based on a preference table, so it is possible. It involves complex Applescripts. I posted the code a year or so ago, but there was little interest.

Link to comment
Share on other sites

  • 5 months later...

Hi,

If Windows (FM "native") does not have the "any printer" option, then does anybody know of a way around this? I develop for a number of sites and catering for all the various printers is a headache. It'd be nice to be able to script a print job to go to the default printer setting portait or landscape (etc) on the way.

Thanks,

Greg

Link to comment
Share on other sites

This topic is 3923 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.