Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Mass Import of Images and names

Featured Replies

I am trying to import 5500 images and names into a database. I made a database with a text field and container field. Below is my script. The container field won't import. I don't want a reference to the field I want the actual picture placed in the field. Please help! Below is my script:

tell application "Finder"

-- change the following to suit your own folder name

tell folder "Elements"

tell folder "!logos"

set myfolder to "Desktop:Elements:!logos"

set app_path to every item

repeat with this_item in app_path

set fileName to the name of this_item

set filepath to (myfolder & ":" & fileName)

tell database of application "FileMaker Pro"

create new record with data {fileName, filepath whose file type is "TIFF"}

--set cell "container" of current record to (a reference to filepath)

--set cell "name" of current record to fileName

end tell

end repeat

end tell

end tell

end tell

My first question has to be why do you not want to store the images as references to files? There are numerous advantages to that approach...

But if you want the images stored internally and you are using 9.x, you can try Akua Sweets scripting addition. This will allow you to convert your image (as long it is a QT supported format) to the PICT data FM uses. You can then set the FM container cell to the PICT data. You first must download and install Akua Sweets (check www.macscripter.net). My trial script follows...

set theAlias to choose file

set theImage to the image from theAlias

tell application "FileMaker Pro"

set cell "container" of current record to theImage

end tell

You will need to modify this to your script. Good luck.

  • Author

I am importing the pictures because I am printing pieces directly from filemaker to a press. I need to have the images availab.e I am not sure how to use the akusweets - I found the store image command, but it doesn't seem to work. I am not sure if I am writing it right. See below:

tell application "Finder"

tell folder "Macintosh HD:Elements:!logos:done"

set myfolder to "Desktop:Elements:!logos"

set app_path to every item

repeat with this_item in app_path

set fileName to the name of this_item

set filepath to (myfolder & ":" & fileName)

store image filepath in "Macintosh HD:Elements:!logos:done:converted" as "PICT"

end repeat

end tell

end tell

Hey batgirl

You just need to get the image data from your source file, and then set the cell to the image data. It will be PICT image data. Akua has QT takes care of the conversion. Modifying your original script...

tell application "Finder"

-- change the following to suit your own folder name

tell folder "Elements"

tell folder "!logos"

set myfolder to "Desktop:Elements:!logos"

set app_path to every item

repeat with this_item in app_path

set fileName to the name of this_item

set filepath to (myfolder & ":" & fileName)

set theAlias to alias filepath

set theImage to the image from theAlias

tell database of application "FileMaker Pro"

set newRec to create new record

set cell "container" of NewRecord to theImage

set cell "name" of NewRecord to fileName

end tell

end repeat

end tell

end tell

end tell

I hope this helps.

[i still don't see any reason why you can't use image references. You can use your script to move the image to a network location available to the computer doing the printing. There can be some complications if you are in a cross-platform environment, but that can be accommodated.]

Create an account or sign in to comment

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.