sfilemaker2023 Posted November 25, 2005 Posted November 25, 2005 I have a database of images in Filemaker 8, and I have been pasting in jpegs and giving them names etc.. Sometimes I run a find, and find say 40 out of 200. I then want to export all of the images in these receords to a new folder on the desktop. Just the pictures, nothing else. I can export one image at a time using the "export field contents" from the Edit menu, but how do I do this for all found records in one go? I want to end up with a folder of my jpeg images. Any help very much appreciated! Simon
IdealData Posted November 26, 2005 Posted November 26, 2005 I had a look at scripting this with a LOOP, however you hit a problem with file name requirement as you must specify a different file name for each jpg and you can't parameterise it by using some other info from the record. There's doesn't appear to be an easy way here - except maybe ApleScript.
sfilemaker2023 Posted November 26, 2005 Author Posted November 26, 2005 thanks for looking at it Mark. I'm not familiar enough with applescript to write one of my own, but hopefully someone has a solution. Given that FM 8 has images template and they include instructions on how to import photos/images, there must be some way to export multiple images. I would like to be able to export so I can then pull the images into iPhoto and use iPhoto's "Order prints" feature. For instance I migth want to perform a find in my FM images database, and then send the found set off on to iPhoto and then over the internet to Kodak to be printed. Thanks for taking a look- anyone got a solution for us?
Lee Smith Posted November 26, 2005 Posted November 26, 2005 This plugin might be what you are looking for. MediaManager formerly ExportFM HTH Lee
Fenton Posted November 26, 2005 Posted November 26, 2005 This is actually pretty easy in FileMaker 8. Set a script Variable to the desired file path, Export Field Contents using that variable as the path, then do it again, in a Loop. The path must vary each time, or the previous file will be overwritten. So use a file name. Go to Layout [ “Picture” ] Go to Record/Request/Page [ First ] Loop Set Variable [ $FileExportPath; Value:Get ( DesktopPath ) & Pictures::Name ] Export Field Contents [ Pictures::Image; “$FileExportPath” ] Go to Record/Request/Page [ Next; Exit after last ] End Loop (P.S. You'd want to include a folder in the path, before the file name: Get ( DesktopPath ) & "folder name/" & Pictures::Name Otherwise the export will litter your desktop with files.)
sfilemaker2023 Posted November 26, 2005 Author Posted November 26, 2005 (edited) thanks a million fenton- this looks great. only trouble i am having is replicating what you have done. its probably because i am too much of a novice, but i can't get the middle part of the script into my script will keep trying though... Edited November 26, 2005 by Guest
Fenton Posted November 26, 2005 Posted November 26, 2005 Are you using the Set Variable step in the script? It's at the bottom of the Control group of steps, which is right at the top. You have to name a Variable with either "$" or "$$" at the front. Then you specify the calculation for it. Look it up in the Help. When you use it for the file path, in the Export Field Contents step, just enter it in as is, ie., don't put quotes around it; in my case: $FileExportPath Pictures::Name is just a field with the file name it it, such as: 001.jpg
Lee Smith Posted November 26, 2005 Posted November 26, 2005 Hi Fenton, This looks like it's would work for a photo file that you have used the file references for? How would you modify this for Photos that are imbedded in FM, so that you have created a name for in a text field. (i.e. two fields, one is the container field, and one is a text field for photo name) Lee
sfilemaker2023 Posted November 26, 2005 Author Posted November 26, 2005 (edited) Sorry for being dumb on this- This is what I have in my scriptmaker so far. http://homepage.mac.com/sspence/snapshot.jpg The filemaker database is called "new Dingman Family Database" When i run it is does go through each of the images one by one but creates a file named "?" on the desktop. I'm sure I am missing one of the pieces in your suggestion. My images are all pasted into the database container field. Edited November 26, 2005 by Guest
Fenton Posted November 26, 2005 Posted November 26, 2005 (edited) Interesting. What you've done is include the actual image (container) field itself as the name. This is a little odd. It might still work however, as FileMaker would coerce the image to whatever text was returned by GetAsText(Image). But you'd be better off (for now anyway), using a text field with the name you want (including extension, ie. ".jpg"); like I used Picture::Name. BTW, I left off a prefix, which apparently is unnecessary, but should really be there. It should be: Set Variable [ $FileExportPath; Value: "filemac:" & Get ( DesktopPath ) & Pictures::Name ] (I was going to ask, "Is the field on the layout?", but I just exported from a blank layout (of the same table) and it worked. Amazing, but not neccessarily a good idea.) Also, a suggestion: rename your tables to be shorter names, don't leave it the same long name as the file itself. It makes it much easier to read fields in scripts if the tables are named short and to the point. [Also you might want to try the Set Variable and Export steps on their own, ie., not in a Loop, until you get one working.] Edited November 26, 2005 by Guest
Lee Smith Posted November 26, 2005 Posted November 26, 2005 Hi Fenton, Thank you, I got this to work. Lee :yourock:
sfilemaker2023 Posted November 27, 2005 Author Posted November 27, 2005 also got it working- many thanks for your help on this one.
Fenton Posted November 27, 2005 Posted November 27, 2005 Good. As I said FileMaker 8 has made it pretty easy (finally). Another tip is that the same thing, a calculated file path, works for Imports also, of either files or pictures.
Recommended Posts
This topic is 6937 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