Jump to content

This topic is 7581 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Hi,

I have stored all the pictures as references to the files, and now they are going to change the server. shocked.gif Once they move the files to the new server, I guess the links will be lost ... is there any way to avoid this, or a quick fix? smile.gif

Thanks a lot in advance!

Posted

The links shouldn't be lost if the file paths remain the same. If not, I don't know if there is a quick fix -- but you can convert your images to internally stored using applescript.

Posted

I don't know how you first inserted the pictures. Do you know about the Import Folder option, in the Import dialog (version 6)? It can bring in an entire folder of pictures, including subfolders, either as embedded or referenced.

If, however, embedded is what you want, use jfmcel's idea of AppleScript (or a plug-in, either ImageScan or Troi File can I believe do this, probably others also). Basically, FileMaker stores the referenced path in the container. So if you set a text field to the container you get the path.

Posted

Thank you very much the feedback! smile.gif The images are too big to store them in the files by using applescript. Also they are "all over the place" (not in a certain folder), so I'll have a look at what the plug-ins can do ...

Also I like fenton's idea of getting the path by setting the text field to the container ... how can I do that? blush.gif (I would like to play with it) Please let me know.

Thanks again!

Posted

If the paths are still valid, i.e., before you move them. The container is "theImage," "thePath" is a text field. You should be on the layout with both.

Perform AppleScript [

tell current record of document 1

try

set m to cell "theImage"

set cell "thePath" to m as string

end try

end tell

]

As far as bringing the images in, AppleScript can insert an image file as a reference, by using a file reference. Here's an example from one of my files (you would likely not pick them one at a time like this, but use "list folder" to do a folder at once):

set theFile to (choose file with prompt "Choose the picture to import

Posted

Thanks a lot Fenton! laugh.gif I tried the first part and worked perfectly. So now I know how to have the path in a text field.

However, I tried to bring the paths to a container field, but wasn't able to (I'm new to applescript). I have some questions about the second part, I apologize if they are too basic: blush.gif

set theFile to (choose file with prompt "Choose the picture to import ...")

If I wanted to insert the picture again with the same path (just for testing), can I refer to the "thePath" field where "(choose file with prompt "Choose the picture to import ...")". That is, can I do something like ...

set theFile to "thePath"

Thanks very much in advance

Posted

Hi,

How can I modify the below applescript in order to get the file name instead of the file path? (in the text field) blush.gif

Thank you in advance!

Perform AppleScript [

tell current record of document 1

try

set m to cell "theImage"

set cell "thePath" to m as string

end try

end tell

]

Posted

Fenton answered your question. Use "info for" to get the file name.

Posted

Thanks very much, I'll try that. I don't have an easy access to a Mac to play with AppleScript ( blush.gifshame on me! ) .... so I got the file name by defining two new calculation fields, that refer to the "thePath" field:

thePathWSpaces = Substitute( thePath , ":" , " " )

FileName = RightWords( thePathWSpaces, 1 )

This topic is 7581 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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