ChiSao Posted February 15, 2010 Posted February 15, 2010 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
ChiSao Posted February 17, 2010 Author Posted February 17, 2010 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)
andries Posted February 18, 2010 Posted February 18, 2010 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.
TheTominator Posted February 18, 2010 Posted February 18, 2010 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.
ChiSao Posted March 2, 2010 Author Posted March 2, 2010 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?
Recommended Posts
This topic is 5725 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