you can indeed script page setup and print for a specific printer as long as all users have access to the printer, and if it's named the same)
But you can combine all those things into one script and pass a script parameter.
IE the button for "Print Single Black Portrait" would pass "SBP" as the script parameter,
then your print script would look something like:
If ( Get(ScriptParameter) = "SBP"
print setup (for single black portrait)
Else If ( Get(ScriptParameter) = "SBL"
print setup (for single black landscape)
Else If (etc...)
This would let you control the setup and print step for each of your parameters, and you could change one method or all methods inside of the script for instant re-deployment, as opposed to updating buttons all over the place.
My two pence worth.
I have found that FM has had issues with printing since FM9 was released. Very often a print script that moves from one layout to another and one printer setup to another will result in a layout being printed the ‘wrong’ shape. i.e. a landscape report printed on a laserprinter would come out B6 portrait if immediately prior to printing the report the script had printed a label layout on a labelprinter. This is particularly the case when the script is being run ‘without dialogue’ and the print setups involve switching paper feed and output trays. It seems FM remembers the last print setup instruction and does not replace it with the new one.
Also the general success of setting up print scripts can be affected by what machine the script is programmed on. I have had several instances where a script works perfectly on the machine the script has been written on but fails when the script is run on a different machine (e.g. the script picks the wrong paper feed tray), even though the platform is the same and the printer drivers identical. I have had to either use a plugin to resolve these issues (for example FMButler) or to write separate printing scripts for each page setup. The latter example following Mr Beargie’s script:
If (Get(scriptParameter) = “SBP”
PerformScript ‘PrintSingleBlackPortrait ‘
Where the ‘PrintSingleBlackPortrait ‘ script is a standalone script containing the Print Setup and Print script steps for that particular printing operation. A bit more longwinded but can help solve a problem if you encounter anything like the above.
I trust this might help.
You can also use plenty of other if statements and get functions to customize this to your user's needs.
IE Get(acccountName) for directing printing for specific users.
Thanks for your help guys the Account name will definitely be useful and I think I have sussed what I need to do - not ideal though is it?
You have an advantage being an in-house developer though in that you know the people, printers and requirements for output. Us contractors though have to figure out all those dynamics in a (usually frustrating for the user) process.