mark111 Posted January 3, 2003 Posted January 3, 2003 I wrote a report writing solution for our lab in FMP5.0 I used container fields to insert jpg images and found that using insert quicktime rather than insert picture made a huge difference in performance and file size. We are trying to upgraded to OSX and FMP 6 but since FMP5.5 I have not been able to insert image files from the "insert quicktime" option. The latest fix v.04 allows me to import gif and pct but not jpg. The Filemaker site has a tech note claiming that they have fixed this and any file type recognized by quicktime will work. Does anyone have any ideas on how to work around or when they will really fix it. BTW I tried changing my scripts to "insert picture" and it will allow me to insert jpgs but then I have the speed and file size issues.
jfmcel Posted January 6, 2003 Posted January 6, 2003 Here is an applescript that will allow you to import images as references with OS X. (Tested on FM 6.0v1 and 10.2) set theAlias to choose file of type {"8BPS", "BMP ", "EPSF", "GIFf", "JPEG", "PDF", "PICT", "PNGf", "TPIC", "TIFF"} tell application "FileMaker Pro" to set the cell "Container" of current record to a reference to file (theAlias as string)
mark111 Posted January 7, 2003 Author Posted January 7, 2003 jfmcel, I'm not too familiar with applescript. Do you write that in FMP as part of another script? Or do you have the script somewhere else and just call it? Do you have to enter the filename and path to point the alias each time? There are typically a dozen to as high as 100 images per report, so it could get tedious if that is the case.
jfmcel Posted January 7, 2003 Posted January 7, 2003 There is a Perform AppleScript command in scriptmaker. Just copy and paste the above script into the Script Text window that pops up after clicking the specify button in the Perform AppleScript command window. It is pretty simple. I am working on a sample file that demonstrates other image control capibilities you get with AppleScript. I'll let you know when it's done.
mark111 Posted January 8, 2003 Author Posted January 8, 2003 I tried that and everything looks like it's going to work until I select the file. I get a "Filemaker Pro got an error: Object not found. (Error-10006) message and no image is inserted.
jfmcel Posted January 8, 2003 Posted January 8, 2003 Have you modified the AppleScript so that the name of the container field matches your container field name? Also be sure you are on a layout that contains the target field.
mark111 Posted January 9, 2003 Author Posted January 9, 2003 now I get an unable to coerce data to desired type error. This is the script I have: set theAlias to choose file of type {"8BPS", "BMP ", "EPSF", "GIFf", "JPEG", "PDF", "PICT", "PNGf", "TPIC", "TIFF"} tell application "FileMaker Pro" to set BLANK12 of current record to a reference to file "(theAlias)"
jfmcel Posted January 9, 2003 Posted January 9, 2003 BLANK12 : Should be, maybe, cell "BLANK12". Also you changed (theAlias as string) to "(theAlias)". This is quite different and will not work. If the container field is entitled BLANK12, the script would be... set theAlias to choose file of type {"8BPS", "BMP ", "EPSF", "GIFf", "JPEG", "PDF", "PICT", "PNGf", "TPIC", "TIFF"} tell application "FileMaker Pro" to set the cell "BLANK12" of current record to a reference to file (theAlias as string)
mark111 Posted January 9, 2003 Author Posted January 9, 2003 I'm feeling stupid that I can't make this work. I tried running it in Script Editor and this is what the event log says: tell current application choose file of type {"8BPS", "BMP ", "EPSF", "GIFf", "JPEG", "PDF", "PICT", "PNGf", "TPIC", "TIFF"} --> alias "00mark2:001currentjobs:012166:sem:TD10121-01.JPG" end tell tell application "FileMaker Pro" set cell "BLANK12" of current record to file "00mark2:001currentjobs:012166:sem:TD10121-01.JPG" --> FileMaker Pro got an error: Object not found.
mark111 Posted January 9, 2003 Author Posted January 9, 2003 OK OK I am stupid. It does work Guess the prblem could have been that I was running 2 versions of FM Pro (5.0 and 6.0) and the script was telling the wrong one. Is it possible to have the cell as "currently selected cell" or would I need a separate script for each container field?
mark111 Posted January 10, 2003 Author Posted January 10, 2003 Another update. I got it to work as far as putting the pictures into the container fields. Now the problem seems to be with the printing. One print job with 12 pictures, 3 per page, still did not start printing after 30 minutes. The printer is working and talking to my computer, but is just taking forever to push the job through. With FMP5.0 it prints the same 4 pages with the same images in under 3 minutes when they are inserted as quicktime. Am really frustrated as to why 5.0 can do it and 5.5 and later won't. Really apreciate your help. You've been the only response I've gotten anywhere.
harryk Posted January 10, 2003 Posted January 10, 2003 The slow printing sounds familiar to me (Mac FM 5 and 5.5). When printing from FM, I always choose the Epson Spooler as the active program. When I don't, the printing from FM is tediously slow. This might be a hint to a solution for you. Still, the reason why this happens is unclear to me. I'v learned to live with it, but wonder if I am the only one experiencing this.. HK
mark111 Posted January 10, 2003 Author Posted January 10, 2003 I am using a blue and white MAC with a G4 450MHz upgrade card, 512 M Ram, Jaguar 10.2.3 and printing to a Phaser 6200 over the network. The print speed is only slow when graphic are inserted into FMP 6.0. When I use my version of 5.0 in classic mode I get normal print speeds. (see previous post) Other OSX native applications print fine, such as Graphic converter, Acrobat and Mail. I think the slow printing is caused by the way FMP is handling the graphics. I experience the same slow printing in 5.0 if I insert the images using "insert picture". Using the "insert quicktime" made a huge difference, but for some reason that capability was taken away in the later versions of FMP. jfmcel's solution has promise, it can get the jpg images into the containers but I need to get the print times down.
mark111 Posted January 13, 2003 Author Posted January 13, 2003 jfmcel, Thanks for your help with a little more tweaking on my solution I got everything working. All of the images now can be inserted, the print times are down below 5 minutes for a 4 page document with 3 4x5" images per page and the file is only a couple of meg rather than 100's. Thanks
Recommended Posts
This topic is 7986 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 accountSign in
Already have an account? Sign in here.
Sign In Now