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

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

Recommended Posts

Posted

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

Posted

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.

Posted (edited)

I'll try that, thanks

For reference I had to wrap separately the main script and the sub routine

Edited by Guest
  • 2 months later...

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