Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

Posted

Situation:

I'm calling an applescript to create and save a new Word Document with a calculated filename.

Now I would like to store this file (just the reference) directly to FM into a Container field.

Problem:

First I tried with FM script "Insert File" but I don't know how to define the source File, because the filename is based on a calculation

Second thought was to store the reference with applescript but there is the same problem.

any ideas?

by

ChiSao

Posted

I tried GetAsText(container) to export the path but I cant reimport this path into the container field. It doesn't work

So is there really no possibility to write a reference into a container field? I can't believe this.

Otherwise I have to use a normal field to store the path and a script trigger to open an apple scipt to open the file with an externel program (Word, Acrobat and so on)

(much more complicated than the container field)

Posted

FIleMaker paths are not OS paths. I think you have to transform the path in your AppleScript from the FM path to a Mac OS path.

I don't know this by head, but if you do some research you will find the way.

Posted

I tried GetAsText(container) to export the path but I cant reimport this path into the container field. It doesn't work

Take one of the paths you get with GetAsText(container) (a relative or an absolute one) and use Set Field[container, thePath] where thePath is the text path in the correct format. You are assigning a bit of text to the container, but that's ok. It will work out.

  • 2 weeks later...
Posted

So finally I found the solution.

When writing a path to a container field it's important to have a "space" a the end of the path like:

"filemac:/Macintosh HD/word.doc "

the empty space after doc is important.

Does someone know why?

This topic is 5378 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.