May 2, 200520 yr Hallo I'm trying to automate the process of inserting word documents into container fields (reference only) using applescript and I'm missing something. If I use set file_path to (choose file) as string and later set the cell "Pathname" to file_path the container holds the pathname as a string and wont launch the file on manual entry/ double click to the field If I use set file_path to (choose file) or set file_path to (choose file) as alias Then later Applescript "Gets an error.. Filemaker cant set ...etc etc" Any thoughts or assistance greatly appreciated. Thanks Simon
May 2, 200520 yr AppleScript and FileMaker are telling you the truth. You can't Insert File with AppleScript, as far as I know. You have to copy or move the file to a fixed location and name, where FileMaker can then Insert File, using its fixed File Reference. This is a modified version of an earlier file I posted, which first zipped the file before using Insert File. This one just Inserts it as is. It uses the Unix "ditto" command (which can also zip it) to copy the file to the "temporary items" folder (where it is later deleted). Warning: If you have file on the desktop with the same name as the file name in the FileMaker field, exporting will replace it, with no warning, and no change of modification date; such as an updated version of the inserted file. Gone forever. One could write a warning I suppose. But I must go make coffee now :-] InsertFileTI.zip
Create an account or sign in to comment