This calculation takes into account different days in a month as well as leap years and negative distances. Y & " years, " & m & " months, and " & d & " days" & ¶ Y = Year ( d2 ) - Year ( d1 ) - ( ( Month ( d2 ). Keystroke return - depress the "Print" buttonī) You could create a FileMaker script step that prints the layout to PDF, and then have AppleScript take over, open the PDF in something, such as Adobe Acrobat Professional, and print it X number of times from there.Function definition: (Copy & paste into FileMaker's Edit Custom Function window) // © 2006 Winfried Huslik, Let ( [ĭ = mod ( Day ( d2 ) - Day ( d1 ) Day (ĭate ( Month ( d1 ) + 1 0 year ( d1 ) ) ) ) For example: tell application "System Events"Ĭlick menu item "HP Laser" - Your printer name To work around this issue, here are some suggestions…Ī) You could use GUI scripting to simulate user interaction to select the printer and type the number of copies into the print dialog. … and confirmed that FileMaker does indeed use the last printer that was used, and not necessarily the printer that I have specified in the “Printer Setup Utility”. Set current printer to printer "HP Laser" I just did a quick test… tell application "Printer Setup Utility" I just need to find a way to get FileMaker to do what I ask by either an AppleScript or a ScriptMaker script. In part, this problem is described at – but the solution listed there doesn’t work in this case. What’s interesting is that I can see from the printer list in the Printer Setup Utility that the default (e.g., current) printer is properly set to someprinter1. In other words…īecause apparently FileMaker feels that it should do what was done last time, not what I’m specifying. Since the last print job I did from the printer was to print to someprinter2 (note different printer), and I printed 2 copies of something, it does that again. In this script, I’m setting the printer to the printer I want to use someprinter1, and then printing 1 copy of the cover letter, and 3 copies of the flyer. Tell application "FileMaker Pro Advanced" Let me explain: tell application "Printer Setup Utility" The problem is that FileMaker is ignoring what I tell it, and going with whatever was the last print settings done from the user interface. In the final solution, I can call that now from within a ScriptMaker script (executing native AppleScript) and that should work. I just came across this and have gotten it work: tell application "FileMaker Pro Advanced" I was trying to figure out actually the reference object for the AppleScript. It’s probably possible with AppleScript, but since I generally find AppleScript to be a “read only” language, I could certainly use some examples to pilfer from. I’m happy for this to be in either ScriptMaker or AppleScript, but I’ve been unable to find a good solution.Ĭlearly, I can print with ScriptMaker, but I cannot dynamically specify the copies. I want to have a resulting stack of paper that looks like this:ĥ0 copies of the flyer personalized to LAĢ5 copies of the flyer personalized to NY Remember, the flyers for each location are different not only by quantity, but that they are “personalized” (e.g., one flyer prints with LA on it, and the other with NY on it). LA needs 50 copies of the flyer, and NY needs 25 copies of the flyer. Let’s say that we have two centers: LA and NY. After that one page is printed for a record, I want to print the flyer for each record … but I want to print the number of copies specified by “numcopies” for that record. For each record, I would like to print one copy of the cover letter (the layout called “cover letter”). I’d like to run a script that goes through each of the records in the database. The two layouts are personalized for each record. I have a database called “centers” with about 50-100 records. After several hours of web searching, and not finding the answer … it’s time for an email list post.
0 Comments
Leave a Reply. |