July 16, 200520 yr This works in apple script but not in Filemaker. and falls over at the line- "set this_data to ((read FMFile) & return as string)" I am adding a tab separated file (exported from FM) to another file which is created by the script and contains the exported files field titles. For the script to work it needs a tab separated file on the desktop called "export.txt" (with 6 fields) Any ideas why it works in applescript and not in file maker? Thanks as always -------------------------------------- set this_data to "First" & tab & "Last" & tab & "Company" & tab & "Job title" & tab & "Email" & tab & "mobile" & return set this_file to (((path to desktop folder) as text) & "temp_header.txt") my write_to_file(this_data, this_file, true) set FMFile to (((path to desktop folder) as text) & "Export.txt") as alias set this_data to ((read FMFile) & return as string) set this_file to (((path to desktop folder) as text) & "temp_header.txt") my write_to_file(this_data, this_file, true) on write_to_file(this_data, target_file, append_data) try set the target_file to the target_file as text set the open_target_file to
July 16, 200520 yr I believe it's that you need to put the entire write to file block inside a tell application "Finder" block. There are a few commands that only work in FileMaker if you do this.
July 18, 200520 yr Author I'll try that, thanks For reference I had to wrap separately the main script and the sub routine Edited July 18, 200520 yr by Guest
September 27, 200520 yr Hi, Refer my post for http://fmforums.com/forum/showtopic.php?tid/155161/.. Let me know if it helps... Regards, MetaSys Software Pvt. Ltd. www.metasyssoftware.com
Create an account or sign in to comment