November 26, 200718 yr Newbies Hi there I have a job for a client who is using fmp9. He has a Museum Catalog with a few hundred 'pages' of information. There are a number of feilds. It is a catalog for museum artefacts. There is a name, a catalog number, an illustration (image) field, some descriptons, size etc... We need to get the image out, which is possible by selecting the field, and exporting its contents. But we will need to do this 3,500 times. here is my question: Is it Possible to write a script, to start at page one, export the image and name it with the catalogue number. and move thru the whole list of say 500 pages and do this for every page. i.e. the script would run something like: 1. open catalog 2. goto p1. 3. select cat. no. field 4. copy field content 5. select illustration1 field 6. export field content 7. paste copied cat no. 8. save in path /images 9. go to page +1 and go to step 1 10. loop till x= 500 (or something) any ideas?
November 27, 200718 yr You can cut down the steps somewhat, as the file is named at the same time it's exported. Create a FileMaker calculation, result Text, Storage, [x] Do not store, = "filemac:" & Get (DesktopPath) & "Museum_Images/" & Cat. No. & ".jpg" This is just so you can see if it's correct. You're going to put it in a script Variable (script step). Create the folder "Museum_Images" on your Desktop (somewhere to put them). Find the records you want to do. Go to Record [ First ] Loop Set Variable [ $path; "filemac:" & Get (DesktopPath) & "Museum_Images/" & Cat. No. & ".jpg" ] Go to Field [ Illustration ] Export Field Contents [ Illustration; $path ] Go To Record/Request [ Next; Exit after last ] End Loop Type $path as is in the file dialog, don't put quotes around it. You should look first to make sure your images are jpegs. If inserted in earlier versions of FileMaker they might be PICTs, ".pct", which are considerably larger.
December 2, 200718 yr Author Newbies thanks a lot for your detailed reply. i wonder.. i havent ever used fmp before nor have i scripted so you know my programming understanding, i have programmed basic stamps a bit and some flash and html but not advanced. will it be hard for me to work this out do you think. as i did not understand much of what your wrote me. im not sure how to implement the advice harky
December 4, 200718 yr Author Newbies the file attachment link seems to be broken. Im getting this error: [color:red]Error Page 404 You have requested /uploads/1196617108-Container_Export_DT.fp7.zip You have requested a resource that does not exist. The above information has been logged. when i try to save the file to my desktop, the browser says the file does not exist. harky
December 4, 200718 yr Yes, that happened to everyone's files recently. Here, I'll upload again. Container_Export_DT.fp7.zip
Create an account or sign in to comment