|
|
| 1 2 |
|
Neil Ticktin-2
|
Good Evening.
After several hours of web searching, and not finding the answer ... it's time for an email list post. Background: I have a database called "centers" with about 50-100 records. One of the fields is called "numcopies" One layout is called "cover letter" One layout is called "flyer" The two layouts are personalized for each record. Task: I'd like to run a script that goes through each of the records in the database. For each record, I would like to print one copy of the cover letter (the layout called "cover letter"). 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. Simple Example: Let's say that we have two centers: LA and NY. LA needs 50 copies of the flyer, and NY needs 25 copies of the flyer. 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). I want to have a resulting stack of paper that looks like this: Single page cover letter to LA 50 copies of the flyer personalized to LA Single page cover letter to NY 25 copies of the flyer personalized to NY The problem: I'm happy for this to be in either ScriptMaker or AppleScript, but I've been unable to find a good solution. Clearly, I can print with ScriptMaker, but I cannot dynamically specify the copies. It's probably possible with AppleScript, but since I generally find AppleScript to be a "read only" language <g>, I could certainly use some examples to pilfer from. :) Thanks! Neil |
||||||||||||||||
|
dwdc
|
on 8/29/07 8:24 PM, Neil Ticktin stated:
> Single page cover letter to LA > 50 copies of the flyer personalized to LA > Single page cover letter to NY > 25 copies of the flyer personalized to NY I think you should define a separate subscript for different QUANTITIES of pages. Here is an example of what scripts you should have with QTY in the script name: Print Letterhead Print 100 pages Print 90 pages Print 80 pages Print 70 pages Print 60 pages Print 50 pages Print 40 pages Print 30 pages Print 20 pages Print 10 pages Print 5 pages Print 4 pages Print 3 pages Print 2 pages Print 1 page Then you can define a script call "PRINT PAGE(S) MASTER" Go To Record ["FIRST"] Loop Go To Layout ["whatever"] Set Variable ["$$Counter", "numcopies"] Perform Script [ subscript, "Print Letterhead"] Loop Exit Loop If [$$Counter < 100] Perform Script [ subscript, "Print 100 pages"] Set Variable ["$$Counter", "$$Counter - 100"] End Loop Loop Exit Loop If [$$Counter < 90] Perform Script [ subscript, "Print 90 pages"] Set Variable ["$$Counter", "$$Counter - 90"] End Loop Loop Exit Loop If [$$Counter < 80] Perform Script [ subscript, "Print 80 pages"] Set Variable ["$$Counter", "$$Counter - 80"] End Loop Loop Exit Loop If [$$Counter < 70] Perform Script [ subscript, "Print 70 pages"] Set Variable ["$$Counter", "$$Counter - 70"] End Loop Loop Exit Loop If [$$Counter < 60] Perform Script [ subscript, "Print 60 pages"] Set Variable ["$$Counter", "$$Counter - 60"] End Loop Loop Exit Loop If [$$Counter < 50] Perform Script [ subscript, "Print 50 pages"] Set Variable ["$$Counter", "$$Counter - 50"] End Loop Loop Exit Loop If [$$Counter < 40] Perform Script [ subscript, "Print 40 pages"] Set Variable ["$$Counter", "$$Counter - 40"] End Loop Loop Exit Loop If [$$Counter < 30] Perform Script [ subscript, "Print 30 pages"] Set Variable ["$$Counter", "$$Counter - 30"] End Loop Loop Exit Loop If [$$Counter < 20] Perform Script [ subscript, "Print 20 pages"] Set Variable ["$$Counter", "$$Counter - 20"] End Loop Loop Exit Loop If [$$Counter < 10] Perform Script [ subscript, "Print 10 pages"] Set Variable ["$$Counter", "$$Counter - 10"] End Loop Loop Exit Loop If [$$Counter < 5] Perform Script [ subscript, "Print 5 pages"] Set Variable ["$$Counter", "$$Counter - 5"] End Loop Loop Exit Loop If [$$Counter < 4] Perform Script [ subscript, "Print 4 pages"] Set Variable ["$$Counter", "$$Counter - 4"] End Loop Loop Exit Loop If [$$Counter < 3] Perform Script [ subscript, "Print 3 pages"] Set Variable ["$$Counter", "$$Counter - 3"] End Loop Loop Exit Loop If [$$Counter < 2] Perform Script [ subscript, "Print 2 pages"] Set Variable ["$$Counter", "$$Counter - 2"] End Loop Loop Exit Loop If [$$Counter < 1] Perform Script [ subscript, "Print 1 pages"] Set Variable ["$$Counter", "$$Counter - 1"] End Loop Go To Record [exit after last, "NEXT"] End loop This script works this way: It sets the QTY in a temp variable ($$Counter"), then categorically prints batches of pages base on the variable (which decrements based on the pages printed) until the variable reaches the value ZERO. So here some examples of how the printing would go: QTY = 222 Perform Script [ subscript, "Print 100 pages"] - Loops 2 times Perform Script [ subscript, "Print 20 pages"] - Loops 1 times Perform Script [ subscript, "Print 2 pages"] - Loops 1 times QTY = 189 Perform Script [ subscript, "Print 100 pages"] - Loops 1 times Perform Script [ subscript, "Print 80 pages"] - Loops 1 times Perform Script [ subscript, "Print 5 pages"] - Loops 1 times Perform Script [ subscript, "Print 4 pages"] - Loops 1 times Etc... This only disadvantage to this method is you cannot include PAGE NUMBERS of your layouts since every batch start back at ONE. Hope this helps!!! Don Wieland DW DATA CONCEPTS ~~~~~~~~~~~~~~~~~~~~~~~~~ Direct Line - (714) 389-4026 Fax - (714) 389-4027 [hidden email] http://www.dwdataconcepts.com Integrated data solutions to fit your business needs. APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. http://www.appointment10.com/ |
||||||||||||||||
|
Richard S. Russell
|
In reply to this post
by Neil Ticktin-2
On 2007 Aug 29, at 22:24, Neil Ticktin wrote:
> Good Evening. > > After several hours of web searching, and not finding the > answer ... it's time for an email list post. > > Background: > I have a database called "centers" with about 50-100 records. > One of the fields is called "numcopies" > One layout is called "cover letter" > One layout is called "flyer" > The two layouts are personalized for each record. > > Task: > I'd like to run a script that goes through each of the records in > the database. For each record, I would like to print one copy of > the cover letter (the layout called "cover letter"). 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. > > Simple Example: > Let's say that we have two centers: LA and NY. LA needs 50 copies > of the flyer, and NY needs 25 copies of the flyer. 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). > > I want to have a resulting stack of paper that looks like this: > > Single page cover letter to LA > 50 copies of the flyer personalized to LA > Single page cover letter to NY > 25 copies of the flyer personalized to NY > > The problem: > I'm happy for this to be in either ScriptMaker or AppleScript, but > I've been unable to find a good solution. > > Clearly, I can print with ScriptMaker, but I cannot dynamically > specify the copies. > > It's probably possible with AppleScript, but since I generally find > AppleScript to be a "read only" language <g>, I could certainly use > some examples to pilfer from. :) > > Thanks! > > Neil Stupid but effective: Do a ScriptMaker script with 2 nested loops. The outer loop runs thru the records, 1 at a time, and issues a single "Print 1 copy" command from the "cover letter" layout. The inner loop runs "numcopies" times, each pass thru the loop issuing a "Print 1 copy" command from the "flyer" layout. |
||||||||||||||||
|
Data531
|
Hello
In my databases I use a lot of the New Window and GTRR New Window options in my scripts. On OS X the new windows open smoothly, logically and with no flicker. Just perfect and a breeze to use. However, I am having all sorts of screen redraw issues, flashing, other database layouts appearing and generally unprofessional looking display when the same scripts run on Windows XP computers. Windows that are maximised don't stay maximised. Freeze window Script steps are not obeyed. Other databases that are hidden are brought forward. This is so frustrating and I don't understand why the difference in display behaviour between Mac OSX and Windows XP. Does anyone have any tips to improve scripting of New Window and other window script steps under Windows XP so it approximates and matches what I expect and receive on OSX? FileMaker 9.0.1, 8.5 and 8.0 on Windows XP and Mac OS 10.4. Thanks in advance. David Australia. |
|
Neil Ticktin-2
|
In reply to this post
by Richard S. Russell
Yeah -- I thought about that as well. The only problem is that the "flyer"
is a full color graphic that will take time to rasterize. So, I was trying to avoid having to have the computer do that over and over again. Thanks! At 1:52 AM -0500 8/30/07, Richard S. Russell wrote: > > >Stupid but effective: Do a ScriptMaker script with 2 nested loops. >The outer loop runs thru the records, 1 at a time, and issues a >single "Print 1 copy" command from the "cover letter" layout. The >inner loop runs "numcopies" times, each pass thru the loop issuing a >"Print 1 copy" command from the "flyer" layout. >> >On 2007 Aug 29, at 22:24, Neil Ticktin wrote: > >> Good Evening. >> >> After several hours of web searching, and not finding the >> answer ... it's time for an email list post. >> >> Background: >> I have a database called "centers" with about 50-100 records. >> One of the fields is called "numcopies" >> One layout is called "cover letter" >> One layout is called "flyer" >> The two layouts are personalized for each record. >> >> Task: >> I'd like to run a script that goes through each of the records in >> the database. For each record, I would like to print one copy of >> the cover letter (the layout called "cover letter"). 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. >> >> Simple Example: >> Let's say that we have two centers: LA and NY. LA needs 50 copies >> of the flyer, and NY needs 25 copies of the flyer. 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). >> >> I want to have a resulting stack of paper that looks like this: >> >> Single page cover letter to LA >> 50 copies of the flyer personalized to LA >> Single page cover letter to NY >> 25 copies of the flyer personalized to NY >> >> The problem: >> I'm happy for this to be in either ScriptMaker or AppleScript, but >> I've been unable to find a good solution. >> >> Clearly, I can print with ScriptMaker, but I cannot dynamically >> specify the copies. >> >> It's probably possible with AppleScript, but since I generally find >> AppleScript to be a "read only" language <g>, I could certainly use >> some examples to pilfer from. :) >> >> Thanks! >> >> Neil > |
||||||||||||||||
|
Neil Ticktin-2
|
In reply to this post
by dwdc
Wow -- interesting brute force method. If it really turns out that
FileMaker doesn't have the capability to specify copies, this is probably a good way to go. I'm pretty sure there's no good way to do this through ScriptMaker at this point ... but I'm hoping that there's something that AppleScript can do. Thanks! Neil At 10:53 PM -0700 8/29/07, Don Wieland wrote: >on 8/29/07 8:24 PM, Neil Ticktin stated: > >> Single page cover letter to LA >> 50 copies of the flyer personalized to LA >> Single page cover letter to NY >> 25 copies of the flyer personalized to NY > >I think you should define a separate subscript for different QUANTITIES of >pages. Here is an example of what scripts you should have with QTY in the >script name: > >Print Letterhead >Print 100 pages >Print 90 pages >Print 80 pages >Print 70 pages >Print 60 pages >Print 50 pages >Print 40 pages >Print 30 pages >Print 20 pages >Print 10 pages >Print 5 pages >Print 4 pages >Print 3 pages >Print 2 pages >Print 1 page > >Then you can define a script call "PRINT PAGE(S) MASTER" > >Go To Record ["FIRST"] >Loop > Go To Layout ["whatever"] > Set Variable ["$$Counter", "numcopies"] > Perform Script [ subscript, "Print Letterhead"] > Loop > Exit Loop If [$$Counter < 100] > Perform Script [ subscript, "Print 100 pages"] > Set Variable ["$$Counter", "$$Counter - 100"] > End Loop > Loop > Exit Loop If [$$Counter < 90] > Perform Script [ subscript, "Print 90 pages"] > Set Variable ["$$Counter", "$$Counter - 90"] > End Loop > Loop > Exit Loop If [$$Counter < 80] > Perform Script [ subscript, "Print 80 pages"] > Set Variable ["$$Counter", "$$Counter - 80"] > End Loop > Loop > Exit Loop If [$$Counter < 70] > Perform Script [ subscript, "Print 70 pages"] > Set Variable ["$$Counter", "$$Counter - 70"] > End Loop > Loop > Exit Loop If [$$Counter < 60] > Perform Script [ subscript, "Print 60 pages"] > Set Variable ["$$Counter", "$$Counter - 60"] > End Loop > Loop > Exit Loop If [$$Counter < 50] > Perform Script [ subscript, "Print 50 pages"] > Set Variable ["$$Counter", "$$Counter - 50"] > End Loop > Loop > Exit Loop If [$$Counter < 40] > Perform Script [ subscript, "Print 40 pages"] > Set Variable ["$$Counter", "$$Counter - 40"] > End Loop > Loop > Exit Loop If [$$Counter < 30] > Perform Script [ subscript, "Print 30 pages"] > Set Variable ["$$Counter", "$$Counter - 30"] > End Loop > Loop > Exit Loop If [$$Counter < 20] > Perform Script [ subscript, "Print 20 pages"] > Set Variable ["$$Counter", "$$Counter - 20"] > End Loop > Loop > Exit Loop If [$$Counter < 10] > Perform Script [ subscript, "Print 10 pages"] > Set Variable ["$$Counter", "$$Counter - 10"] > End Loop > Loop > Exit Loop If [$$Counter < 5] > Perform Script [ subscript, "Print 5 pages"] > Set Variable ["$$Counter", "$$Counter - 5"] > End Loop > Loop > Exit Loop If [$$Counter < 4] > Perform Script [ subscript, "Print 4 pages"] > Set Variable ["$$Counter", "$$Counter - 4"] > End Loop > Loop > Exit Loop If [$$Counter < 3] > Perform Script [ subscript, "Print 3 pages"] > Set Variable ["$$Counter", "$$Counter - 3"] > End Loop > Loop > Exit Loop If [$$Counter < 2] > Perform Script [ subscript, "Print 2 pages"] > Set Variable ["$$Counter", "$$Counter - 2"] > End Loop > Loop > Exit Loop If [$$Counter < 1] > Perform Script [ subscript, "Print 1 pages"] > Set Variable ["$$Counter", "$$Counter - 1"] > End Loop > Go To Record [exit after last, "NEXT"] >End loop > > >This script works this way: > >It sets the QTY in a temp variable ($$Counter"), then categorically prints >batches of pages base on the variable (which decrements based on the pages >printed) until the variable reaches the value ZERO. > >So here some examples of how the printing would go: > >QTY = 222 >Perform Script [ subscript, "Print 100 pages"] - Loops 2 times >Perform Script [ subscript, "Print 20 pages"] - Loops 1 times >Perform Script [ subscript, "Print 2 pages"] - Loops 1 times > >QTY = 189 >Perform Script [ subscript, "Print 100 pages"] - Loops 1 times >Perform Script [ subscript, "Print 80 pages"] - Loops 1 times >Perform Script [ subscript, "Print 5 pages"] - Loops 1 times >Perform Script [ subscript, "Print 4 pages"] - Loops 1 times > >Etc... > >This only disadvantage to this method is you cannot include PAGE NUMBERS of >your layouts since every batch start back at ONE. > >Hope this helps!!! > >Don Wieland >DW DATA CONCEPTS >~~~~~~~~~~~~~~~~~~~~~~~~~ > >Direct Line - (714) 389-4026 >Fax - (714) 389-4027 >[hidden email] >http://www.dwdataconcepts.com > >Integrated data solutions to fit your business needs. > >APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. > >http://www.appointment10.com/ |
||||||||||||||||
|
Winfried Huslik
|
Neil,
You can do it the intelligent (binary) way: Set up a number of scripts with predefined numbers of copies for 1, 2, 4, 8, 16, 32, 64. Then make another script (pass number of desired pages as parameter) that calls the necessary scripts to print the desired number of pages - always use the highest (scripted pages) number possible. As to the number of scripts: Not more than 7. If the pages to print is p. e. 500, that 64er script would be called 8 times. Not too many print jobs, right? This way you never have more than a few print jobs, which should perform quite fast. If you loop around a one page script you run into another issue, because the printer queue piles up and will almost certainly crash your printer driver. And it prints much slower. Winfried www.fmdiff.com On 30.08.2007, at 16:38, Neil Ticktin wrote: > Wow -- interesting brute force method. If it really turns out that > FileMaker doesn't have the capability to specify copies, this is > probably a > good way to go. > > I'm pretty sure there's no good way to do this through ScriptMaker > at this > point ... but I'm hoping that there's something that AppleScript > can do. > > Thanks! > > Neil > > > > > At 10:53 PM -0700 8/29/07, Don Wieland wrote: >> on 8/29/07 8:24 PM, Neil Ticktin stated: >> >>> Single page cover letter to LA >>> 50 copies of the flyer personalized to LA >>> Single page cover letter to NY >>> 25 copies of the flyer personalized to NY >> >> I think you should define a separate subscript for different >> QUANTITIES of >> pages. Here is an example of what scripts you should have with >> QTY in the >> script name: >> >> Print Letterhead >> Print 100 pages >> Print 90 pages >> Print 80 pages >> Print 70 pages >> Print 60 pages >> Print 50 pages >> Print 40 pages >> Print 30 pages >> Print 20 pages >> Print 10 pages >> Print 5 pages >> Print 4 pages >> Print 3 pages >> Print 2 pages >> Print 1 page >> >> Then you can define a script call "PRINT PAGE(S) MASTER" >> >> Go To Record ["FIRST"] >> Loop >> Go To Layout ["whatever"] >> Set Variable ["$$Counter", "numcopies"] >> Perform Script [ subscript, "Print Letterhead"] >> Loop >> Exit Loop If [$$Counter < 100] >> Perform Script [ subscript, "Print 100 pages"] >> Set Variable ["$$Counter", "$$Counter - 100"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 90] >> Perform Script [ subscript, "Print 90 pages"] >> Set Variable ["$$Counter", "$$Counter - 90"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 80] >> Perform Script [ subscript, "Print 80 pages"] >> Set Variable ["$$Counter", "$$Counter - 80"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 70] >> Perform Script [ subscript, "Print 70 pages"] >> Set Variable ["$$Counter", "$$Counter - 70"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 60] >> Perform Script [ subscript, "Print 60 pages"] >> Set Variable ["$$Counter", "$$Counter - 60"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 50] >> Perform Script [ subscript, "Print 50 pages"] >> Set Variable ["$$Counter", "$$Counter - 50"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 40] >> Perform Script [ subscript, "Print 40 pages"] >> Set Variable ["$$Counter", "$$Counter - 40"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 30] >> Perform Script [ subscript, "Print 30 pages"] >> Set Variable ["$$Counter", "$$Counter - 30"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 20] >> Perform Script [ subscript, "Print 20 pages"] >> Set Variable ["$$Counter", "$$Counter - 20"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 10] >> Perform Script [ subscript, "Print 10 pages"] >> Set Variable ["$$Counter", "$$Counter - 10"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 5] >> Perform Script [ subscript, "Print 5 pages"] >> Set Variable ["$$Counter", "$$Counter - 5"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 4] >> Perform Script [ subscript, "Print 4 pages"] >> Set Variable ["$$Counter", "$$Counter - 4"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 3] >> Perform Script [ subscript, "Print 3 pages"] >> Set Variable ["$$Counter", "$$Counter - 3"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 2] >> Perform Script [ subscript, "Print 2 pages"] >> Set Variable ["$$Counter", "$$Counter - 2"] >> End Loop >> Loop >> Exit Loop If [$$Counter < 1] >> Perform Script [ subscript, "Print 1 pages"] >> Set Variable ["$$Counter", "$$Counter - 1"] >> End Loop >> Go To Record [exit after last, "NEXT"] >> End loop >> >> >> This script works this way: >> >> It sets the QTY in a temp variable ($$Counter"), then >> categorically prints >> batches of pages base on the variable (which decrements based on >> the pages >> printed) until the variable reaches the value ZERO. >> >> So here some examples of how the printing would go: >> >> QTY = 222 >> Perform Script [ subscript, "Print 100 pages"] - Loops 2 times >> Perform Script [ subscript, "Print 20 pages"] - Loops 1 times >> Perform Script [ subscript, "Print 2 pages"] - Loops 1 times >> >> QTY = 189 >> Perform Script [ subscript, "Print 100 pages"] - Loops 1 times >> Perform Script [ subscript, "Print 80 pages"] - Loops 1 times >> Perform Script [ subscript, "Print 5 pages"] - Loops 1 times >> Perform Script [ subscript, "Print 4 pages"] - Loops 1 times >> >> Etc... >> >> This only disadvantage to this method is you cannot include PAGE >> NUMBERS of >> your layouts since every batch start back at ONE. >> >> Hope this helps!!! >> >> Don Wieland >> DW DATA CONCEPTS >> ~~~~~~~~~~~~~~~~~~~~~~~~~ >> >> Direct Line - (714) 389-4026 >> Fax - (714) 389-4027 >> [hidden email] >> http://www.dwdataconcepts.com >> >> Integrated data solutions to fit your business needs. >> >> APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. >> >> http://www.appointment10.com/ |
||||||||||||||||
|
Jason L DeLooze
|
Winfried,
I thought about the binary route also, until Neil mentioned that "the flyer is a full color graphic that will take time to rasterize". In that situation, Neil should minimize the number of print jobs queued (to fulfill the print order) because each print job causes a rasterization. If we assume, for example, that all of Neil's print orders will be less than 1000 pages, an **expansion** of Don's approach will guarantee that a print order will take at most 3 print jobs: one for the 100s, on for the 10s, and one for the 1s. For example, if NumCopies = 678, the print order would consist of 3 print jobs: one for 600 copies, one for 70 copies, and one for 8 copies. Any print order less than 1000 would take 2.7 print jobs, on average. On the other hand, using a binary representation of NumCopies, there can be as many as 9 print jobs in a single print order (NumCopies = 511, 767, 895, etc), with an average print job count of 4.9. [if we assumed NumCopies <= 500, the binary method would still require, on average, 4.4 print jobs/order]. Regards, Jason L. DeLooze Annapolis, MD USA On 8/30/07 at 6:03 PM +0200, Winfried Huslik wrote: > Neil, > > You can do it the intelligent (binary) way: > > Set up a number of scripts with predefined numbers of copies for > 1, 2, 4, 8, 16, 32, 64. > > Then make another script (pass number of desired pages as parameter) > that calls the necessary scripts to print the desired number of > pages - always use the highest (scripted pages) number possible. > > > As to the number of scripts: Not more than 7. > If the pages to print is p. e. 500, that 64er script would be > called 8 times. Not too many print jobs, right? > > This way you never have more than a few print jobs, which > should perform quite fast. > > > If you loop around a one page script you run into another issue, > because the printer queue piles up and will almost certainly crash > your printer driver. And it prints much slower. > > > Winfried > www.fmdiff.com > > > > > On 30.08.2007, at 16:38, Neil Ticktin wrote: > >> Wow -- interesting brute force method. If it really turns out that >> FileMaker doesn't have the capability to specify copies, this is probably a >> good way to go. >> >> I'm pretty sure there's no good way to do this through ScriptMaker at this >> point ... but I'm hoping that there's something that AppleScript can do. >> >> Thanks! >> >> Neil >> >> >> >> >> At 10:53 PM -0700 8/29/07, Don Wieland wrote: >>> on 8/29/07 8:24 PM, Neil Ticktin stated: >>> >>>> Single page cover letter to LA >>>> 50 copies of the flyer personalized to LA >>>> Single page cover letter to NY >>>> 25 copies of the flyer personalized to NY >>> >>> I think you should define a separate subscript for different QUANTITIES of >>> pages. Here is an example of what scripts you should have with QTY in the >>> script name: >>> >>> Print Letterhead >>> Print 100 pages >>> Print 90 pages >>> Print 80 pages >>> Print 70 pages >>> Print 60 pages >>> Print 50 pages >>> Print 40 pages >>> Print 30 pages >>> Print 20 pages >>> Print 10 pages >>> Print 5 pages >>> Print 4 pages >>> Print 3 pages >>> Print 2 pages >>> Print 1 page >>> >>> Then you can define a script call "PRINT PAGE(S) MASTER" >>> >>> Go To Record ["FIRST"] >>> Loop >>> Go To Layout ["whatever"] >>> Set Variable ["$$Counter", "numcopies"] >>> Perform Script [ subscript, "Print Letterhead"] >>> Loop >>> Exit Loop If [$$Counter < 100] >>> Perform Script [ subscript, "Print 100 pages"] >>> Set Variable ["$$Counter", "$$Counter - 100"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 90] >>> Perform Script [ subscript, "Print 90 pages"] >>> Set Variable ["$$Counter", "$$Counter - 90"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 80] >>> Perform Script [ subscript, "Print 80 pages"] >>> Set Variable ["$$Counter", "$$Counter - 80"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 70] >>> Perform Script [ subscript, "Print 70 pages"] >>> Set Variable ["$$Counter", "$$Counter - 70"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 60] >>> Perform Script [ subscript, "Print 60 pages"] >>> Set Variable ["$$Counter", "$$Counter - 60"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 50] >>> Perform Script [ subscript, "Print 50 pages"] >>> Set Variable ["$$Counter", "$$Counter - 50"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 40] >>> Perform Script [ subscript, "Print 40 pages"] >>> Set Variable ["$$Counter", "$$Counter - 40"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 30] >>> Perform Script [ subscript, "Print 30 pages"] >>> Set Variable ["$$Counter", "$$Counter - 30"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 20] >>> Perform Script [ subscript, "Print 20 pages"] >>> Set Variable ["$$Counter", "$$Counter - 20"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 10] >>> Perform Script [ subscript, "Print 10 pages"] >>> Set Variable ["$$Counter", "$$Counter - 10"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 5] >>> Perform Script [ subscript, "Print 5 pages"] >>> Set Variable ["$$Counter", "$$Counter - 5"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 4] >>> Perform Script [ subscript, "Print 4 pages"] >>> Set Variable ["$$Counter", "$$Counter - 4"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 3] >>> Perform Script [ subscript, "Print 3 pages"] >>> Set Variable ["$$Counter", "$$Counter - 3"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 2] >>> Perform Script [ subscript, "Print 2 pages"] >>> Set Variable ["$$Counter", "$$Counter - 2"] >>> End Loop >>> Loop >>> Exit Loop If [$$Counter < 1] >>> Perform Script [ subscript, "Print 1 pages"] >>> Set Variable ["$$Counter", "$$Counter - 1"] >>> End Loop >>> Go To Record [exit after last, "NEXT"] >>> End loop >>> >>> >>> This script works this way: >>> >>> It sets the QTY in a temp variable ($$Counter"), then categorically prints >>> batches of pages base on the variable (which decrements based on the pages >>> printed) until the variable reaches the value ZERO. >>> >>> So here some examples of how the printing would go: >>> >>> QTY = 222 >>> Perform Script [ subscript, "Print 100 pages"] - Loops 2 times >>> Perform Script [ subscript, "Print 20 pages"] - Loops 1 times >>> Perform Script [ subscript, "Print 2 pages"] - Loops 1 times >>> >>> QTY = 189 >>> Perform Script [ subscript, "Print 100 pages"] - Loops 1 times >>> Perform Script [ subscript, "Print 80 pages"] - Loops 1 times >>> Perform Script [ subscript, "Print 5 pages"] - Loops 1 times >>> Perform Script [ subscript, "Print 4 pages"] - Loops 1 times >>> >>> Etc... >>> >>> This only disadvantage to this method is you cannot include PAGE NUMBERS of >>> your layouts since every batch start back at ONE. >>> >>> Hope this helps!!! >>> >>> Don Wieland >>> DW DATA CONCEPTS >>> ~~~~~~~~~~~~~~~~~~~~~~~~~ >>> >>> Direct Line - (714) 389-4026 >>> Fax - (714) 389-4027 >>> [hidden email] >>> http://www.dwdataconcepts.com >>> >>> Integrated data solutions to fit your business needs. >>> >>> APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. >>> >>> http://www.appointment10.com/ |
||||||||||||||||
|
James McAlister
|
In reply to this post
by Data531
> However, I am having all sorts of screen redraw issues, flashing,
> other database layouts appearing and generally unprofessional looking > display when the same scripts run on Windows XP computers. My flashing problems disappeared when I uninstalled my Microsoft mouse IntelliPoint software. But there are likely other issues as well; I just don't see them anymore. -- James McAlister www.james-mc.com www.BulletinInserts.org (Windows XP Pro & FM 9 A) |
||||||||||||||||
|
Neil Ticktin-2
|
In reply to this post
by Winfried Huslik
At 6:03 PM +0200 8/30/07, Winfried Huslik wrote:
>Neil, > >You can do it the intelligent (binary) way: > >Set up a number of scripts with predefined numbers of copies for >1, 2, 4, 8, 16, 32, 64. Gotcha. I was hoping for something more concretely explicit. What I've found is that FileMaker won't even do what AppleScript tells it to do. I consider that a bug ... but maybe others consider it a feature. Let me explain... I just came across this and it sort of works in AppleScript: tell application "FileMaker Pro Advanced" print window 1 with copies 2 end tell In the final solution, I can call that from within a ScriptMaker script (executing native AppleScript) and that should work. 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. Let me explain: tell application "Printer Setup Utility" set current printer to printer "someprinter1.somedomain.com" end tell tell application "FileMaker Pro Advanced" tell document "Training Centers" go to layout "Cover Letter" print window 1 with copies 1 go to layout "Coupon Flyer" print window 1 with copies 3 end tell end tell 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. BUT, that's not what end results. 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 other words... I want this: Printed on someprinter1 1 copy of the cover letter 3 copies of the flyer and I get this: Printed on someprinter2 2 copies of the cover letter 2 copies of the flyer because apparently FileMaker feels that it should do what was done last time, not what I'm specifying. 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 part, this problem is described at http://www.fmdiff.com/fm/printing.html -- but the solution listed there doesn't work in this case. I just need to find a way to get FileMaker to do what I ask by either an AppleScript or a ScriptMaker script. Any ideas? Thanks! Neil |
||||||||||||||||
|
dwdc
|
In reply to this post
by Jason L DeLooze
on 8/30/07 10:42 AM, Jason L. DeLooze stated:
> I thought about the binary route also, until Neil mentioned that "the flyer is > a full color graphic that will take time to rasterize". In that situation, > Neil should minimize the number of print jobs queued (to fulfill the print > order) because each print job causes a rasterization. If we assume, for > example, that all of Neil's print orders will be less than 1000 pages, an > **expansion** of Don's approach will guarantee that a print order will take at > most 3 print jobs: one for the 100s, on for the 10s, and one for the 1s. For > example, if NumCopies = 678, the print order would consist of 3 print jobs: > one for 600 copies, one for 70 copies, and one for 8 copies. Any print order > less than 1000 would take 2.7 print jobs, on average. > > On the other hand, using a binary representation of NumCopies, there can be as > many as 9 print jobs in a single print order (NumCopies = 511, 767, 895, etc), > with an average print job count of 4.9. [if we assumed NumCopies <= 500, the > binary method would still require, on average, 4.4 print jobs/order]. OK... There is more than one way to skin a cat ;-) Why not create a UTILITY table (or file - if FMP6 or less). Here's a simple example: Define a table called "PRINT_Utility". Define necessary KEY fields (Global fields) and relationships to get a single job/order's data into the table so will display on every record. Define a field called INDEX (Number Result - non Global) Create 10,000 records. Do a REPLACE in the INDEX field serial (Custom) numbers 1-10,000. Move your Flyer/Letter PRINT layouts to this table and change the fields to your related fields. Define a new sub-script called "PRINT PAGES" Go To Layout [Flyer Print] Set Field ["gJobID", "$$JobID"] Set Field ["gCustomerID", "$$CustomerID"] Etc... Set Error [On] Perform Find [] Set Field ["INDEX", "1..." & $$Num"] Perform Find [] Print Setup [no dialog, Restore] Print [no dialog, Restore] <--- RECORDS BEING BROWSED Now change your script to loop through your customers to this: Go To Record/Request/Page [First] Loop Set Variable ["$$Num", "Job::NumCopies"] Set Variable ["$$JobID", Job::JobID] Set Variable ["$$CustomerID", Job::CustomerID Etc... Commit record/Request [] Perform Script [ subscript, PRINT PAGES] Go To Record/Request/Page [exit after last, "Next"] End Loop Last I check, printing "Records being browsed" produces ONE print job. Hope this helps!!! Don Wieland DW DATA CONCEPTS ~~~~~~~~~~~~~~~~~~~~~~~~~ Direct Line - (714) 389-4026 Fax - (714) 389-4027 [hidden email] http://www.dwdataconcepts.com Integrated data solutions to fit your business needs. APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. http://www.appointment10.com/ |
||||||||||||||||
|
Neil Ticktin-2
|
Don,
Interesting idea. I believe that I understand the below -- and it does, as you say, produce just one print job. But, I still think it would make the biggest graphic be rasterized repeatedly since it would be on different "pages". At this point, I've given up. I believe that there's a bug in FileMaker that does not allow it to accept the instruction from AppleScript. So, I just use a loop to print the same one page over and over. Takes forever to print ... but at least it's the computer's time, not mine. :) Thanks! Neil At 12:27 PM -0700 8/30/07, Don Wieland wrote: >on 8/30/07 10:42 AM, Jason L. DeLooze stated: > >> I thought about the binary route also, until Neil mentioned that "the >>flyer is >> a full color graphic that will take time to rasterize". In that situation, >> Neil should minimize the number of print jobs queued (to fulfill the print >> order) because each print job causes a rasterization. If we assume, for >> example, that all of Neil's print orders will be less than 1000 pages, an >> **expansion** of Don's approach will guarantee that a print order will >>take at >> most 3 print jobs: one for the 100s, on for the 10s, and one for the 1s. >>For >> example, if NumCopies = 678, the print order would consist of 3 print jobs: >> one for 600 copies, one for 70 copies, and one for 8 copies. Any print >>order >> less than 1000 would take 2.7 print jobs, on average. >> >> On the other hand, using a binary representation of NumCopies, there can >>be as >> many as 9 print jobs in a single print order (NumCopies = 511, 767, 895, >>etc), >> with an average print job count of 4.9. [if we assumed NumCopies <= >>500, the >> binary method would still require, on average, 4.4 print jobs/order]. > >OK... There is more than one way to skin a cat ;-) > >Why not create a UTILITY table (or file - if FMP6 or less). Here's a simple >example: > >Define a table called "PRINT_Utility". > >Define necessary KEY fields (Global fields) and relationships to get a >single job/order's data into the table so will display on every record. >Define a field called INDEX (Number Result - non Global) > >Create 10,000 records. Do a REPLACE in the INDEX field serial (Custom) >numbers 1-10,000. > >Move your Flyer/Letter PRINT layouts to this table and change the fields to >your related fields. > >Define a new sub-script called "PRINT PAGES" > >Go To Layout [Flyer Print] >Set Field ["gJobID", "$$JobID"] >Set Field ["gCustomerID", "$$CustomerID"] >Etc... >Set Error [On] >Perform Find [] >Set Field ["INDEX", "1..." & $$Num"] >Perform Find [] >Print Setup [no dialog, Restore] >Print [no dialog, Restore] <--- RECORDS BEING BROWSED > >Now change your script to loop through your customers to this: > >Go To Record/Request/Page [First] >Loop > Set Variable ["$$Num", "Job::NumCopies"] > Set Variable ["$$JobID", Job::JobID] > Set Variable ["$$CustomerID", Job::CustomerID > Etc... > Commit record/Request [] > Perform Script [ subscript, PRINT PAGES] > Go To Record/Request/Page [exit after last, "Next"] >End Loop > >Last I check, printing "Records being browsed" produces ONE print job. > >Hope this helps!!! > >Don Wieland >DW DATA CONCEPTS >~~~~~~~~~~~~~~~~~~~~~~~~~ > >Direct Line - (714) 389-4026 >Fax - (714) 389-4027 >[hidden email] >http://www.dwdataconcepts.com > >Integrated data solutions to fit your business needs. > >APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. > >http://www.appointment10.com/ |
||||||||||||||||
|
Tim Mansour
|
On 31/08/2007, at 1:52 pm, Neil Ticktin wrote:
> At this point, I've given up. I believe that there's a bug in > FileMaker > that does not allow it to accept the instruction from AppleScript. > So, I > just use a loop to print the same one page over and over. Not sure you've mentioned what FM version you're using Neil. Can you save the output to PDF and script Preview to print? Also, how often do the flyers change? ... can you "pre-save" a PDF when the flier changes rather than re-generating them every output? -- Tim Mansour <[hidden email]> |
||||||||||||||||
|
dwdc
|
In reply to this post
by Neil Ticktin-2
on 8/30/07 8:52 PM, Neil Ticktin stated:
> Don, > > Interesting idea. > > I believe that I understand the below -- and it does, as you say, produce > just one print job. But, I still think it would make the biggest graphic > be rasterized repeatedly since it would be on different "pages". Do you know this for a fact? Don't kill it before you know it's true. My point is you should explore a little bit more to come up with the best solution. > At this point, I've given up. I believe that there's a bug in FileMaker > that does not allow it to accept the instruction from AppleScript. So, I > just use a loop to print the same one page over and over. > > Takes forever to print ... but at least it's the computer's time, not mine. :) I understand your frustration. Take some advice from me: If you don't have time to figure out something robust, pay someone a couple bucks to make it hum. In the long run (if time is money to you), you'll recoup what you gave up and more. ;-) Don Wieland DW DATA CONCEPTS ~~~~~~~~~~~~~~~~~~~~~~~~~ Direct Line - (714) 389-4026 Fax - (714) 389-4027 [hidden email] http://www.dwdataconcepts.com Integrated data solutions to fit your business needs. APPOINTMENT 1.0v7 - Add powerful scheduling to your database system. http://www.appointment10.com/ |
||||||||||||||||
|
Richard S. Russell
|
In reply to this post
by Data531
Some javascript/style in this post has been disabled (why?)
On 2007 Aug 30, at 7:23, David J Horne wrote:
I get the same effects you do, David, and I expect it's because of the way the application program (in this case FileMaker Pro) shares responsibility with the operating system. You've probably already noticed by now that fonts take up more vertical space in Windows than they do on the Mac. That's because font handling is a task that the application program fobs off onto the operating system. Normally this is a good thing, as it holds down the size of the application program because it doesn't have to reinvent that particular wheel. (Other things that the app gets from the OS are current date, network connections, and so on, so this is generally a positive thing.) But there are some things where the makers of the application have to squarely face the differences between the 2 platforms and decide what to do about them. For example: • Windows keyboards distinguish between "delete" and "backspace"; Mac keyboards don't. • Mac keyboards distinguish between "enter" and "return"; Windows keyboards don't. • Windows mice have 2 buttons; Mac mice don't. • Mac keyboards have a command key; Windows keyboards don't. • If, on a Mac, you click on a line of text and drag up, it selects everything from that point to the beginning of the line; drag down and it selects from there to the end of the line. Windows doesn't do this. • Double-click on a word in a line of Mac text, and you select the word; do likewise in Windows and you get the surrounding spaces and punctuation as well. • Windows lets you drag ANY border of a window to resize it; the Mac lets you drag only on the lower-right corner. • And, as you have observed, clicking the "resize" button on a Windows window (whether manually or via a script step) resizes (demaximizes) ALL of them; in the Mac, it resizes only the one window you click on. Now, the good folx at FileMaker Inc. COULD have written their own code (overriding the OS's defaults) for ANY of these features. But they chose instead to go with the default features supplied by the OS. This not only makes it easier to deal with upgrades (just keep handing off the task to WHATEVER the current version of the OS is), but it also makes for a consistent interface experience for the vast majority of users, who will be using only Windows, or only the Mac OS, and not having to worry about inconsistencies of behavior when switching between platforms. That's what they pay guys like you the big bucks to worry about. = = = = = = Richard S. Russell, a Bright (http://the-brights.net) 2642 Kendall Av. #2, Madison WI 53705-3736 608+233-5640 • [hidden email] = = = = = = Money is better than poverty, if only for financial reasons. -- Woody Allen
|
||||||||||||||||
|
George Gardiner-2
|
Some javascript/style in this post has been disabled (why?)
Richard, I think you're
being too kind to FMI. This is and has been a major issue for
sometime. No other Windows application I use has this issue, only
FMP. Whatever programming environment FMP uses clearly isn't up to it
and FMI needs to fix this, because it is annoying and makes and FMP
application look amateurish. Regards, George -----Original Message----- |
||||||||||||||||
|
Richard S. Russell
|
Some javascript/style in this post has been disabled (why?)
On 2007 Aug 31, at 2:23, George Gardiner wrote:
Ah, but do other applications permit you to automate the maximizing, minimizing, or resizing of multiple windows? I'm betting not. But you get no argument from me about the annoying and amateurish part. Drives me nuts every time I have to work on a Windows machine. I end up building all sorts of "maximize" commands into scripts that really, in an ideal world, shouldn't need them. Does anyone here have experience with Vista? I haven't yet. Does FMP still exhibit this behavior under that OS?
|
||||||||||||||||
|
Hans Gunnarsson
|
In reply to this post
by Neil Ticktin-2
Just thinking outloud...
I have never had a reason to think about this but is it really not possible to pass the number of requested pages to the printer driver in FM? Iif this is really so I wonder if there is not some technique or plugin available that allows FM to pass parameters to an applescript and from there to the printer driver. Hans On 30.8.2007, at 03:24, Neil Ticktin wrote: > Good Evening. > > After several hours of web searching, and not finding the > answer ... it's time for an email list post. > > Background: > I have a database called "centers" with about 50-100 records. > One of the fields is called "numcopies" > One layout is called "cover letter" > One layout is called "flyer" > The two layouts are personalized for each record. > > Task: > I'd like to run a script that goes through each of the records in > the database. For each record, I would like to print one copy of > the cover letter (the layout called "cover letter"). 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. > > Simple Example: > Let's say that we have two centers: LA and NY. LA needs 50 copies > of the flyer, and NY needs 25 copies of the flyer. 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). > > I want to have a resulting stack of paper that looks like this: > > Single page cover letter to LA > 50 copies of the flyer personalized to LA > Single page cover letter to NY > 25 copies of the flyer personalized to NY > > The problem: > I'm happy for this to be in either ScriptMaker or AppleScript, but > I've been unable to find a good solution. > > Clearly, I can print with ScriptMaker, but I cannot dynamically > specify the copies. > > It's probably possible with AppleScript, but since I generally find > AppleScript to be a "read only" language <g>, I could certainly use > some examples to pilfer from. :) > > Thanks! > > Neil |
||||||||||||||||
|
Hans Gunnarsson
|
In reply to this post
by Richard S. Russell
I suspect you already know this but here it comes anyway...
On 31.8.2007, at 05:23, Richard S. Russell wrote: > > But there are some things where the makers of the application have > to squarely face the differences between the 2 platforms and decide > what to do about them. For example: > • Windows keyboards distinguish between "delete" and "backspace"; > Mac keyboards don't. > • Mac keyboards distinguish between "enter" and "return"; Windows > keyboards don't. > • Windows mice have 2 buttons; Mac mice don't. Actually Mac mice do have more than one button. Either physically as on the mighty mouse and others or by pressing the control button on the Mac keyboard before clicking on a layout. > • Mac keyboards have a command key; Windows keyboards don't. But you normally get the same functions by pressing the control key before entering a keyboard shortcut when working on Windows. You even have Ctrl-Q to quit the application. > • If, on a Mac, you click on a line of text and drag up, it > selects everything from that point to the beginning of the line; > drag down and it selects from there to the end of the line. Windows > doesn't do this. > • Double-click on a word in a line of Mac text, and you select the > word; do likewise in Windows and you get the surrounding spaces and > punctuation as well. > • Windows lets you drag ANY border of a window to resize it; the > Mac lets you drag only on the lower-right corner. > • And, as you have observed, clicking the "resize" button on a > Windows window (whether manually or via a script step) resizes > (demaximizes) ALL of them; in the Mac, it resizes only the one > window you click on. And wouldn't it be nice if we could get rid of the application window when working on Windows |
||||||||||||||||
|
Neil Ticktin-2
|
In reply to this post
by Tim Mansour
At 2:33 PM +1000 8/31/07, Tim Mansour wrote:
>On 31/08/2007, at 1:52 pm, Neil Ticktin wrote: > >> At this point, I've given up. I believe that there's a bug in >> FileMaker >> that does not allow it to accept the instruction from AppleScript. >> So, I >> just use a loop to print the same one page over and over. > >Not sure you've mentioned what FM version you're using Neil. Can you >save the output to PDF and script Preview to print? Yes. I'm sure I can. In fact, that may be a good workaround. >Also, how often >do the flyers change? They are the same for each "location" >... can you "pre-save" a PDF when the flier >changes rather than re-generating them every output? The generation is not the problem -- it's just that FileMaker won't let me print the quantities that I want. Thanks! Neil |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |