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

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

Recommended Posts

Posted

This script works when executed within AppleScript. However, I am having an error when I try to run it in FileMaker. FileMaker Pro does not let me save it. It signal an error with the Write statement. If I put the write statement a COMMENT "--", I do not have an error.

set theEVEclient to {}

set theStart to 1

set theEnd to 4

repeat while (theEnd is less than or equal to length of theEVE)

set theEVEclient to theEVEclient & (text theStart thru theEnd of theEVE)

set theStart to theStart + 5

set theEnd to theEnd + 5

end repeat

try

set fileRef to open for access file theOrder with write permission

write (InvoiceNo & " " & CustomerID & return) to fileRef starting at eof

close access fileRef

on error

try

close file theOrder

end try

end try

I also tried the following, and still have an error with the write statement :

set theEVEclient to {}

set theStart to 1

set theEnd to 4

repeat while (theEnd is less than or equal to length of theEVE)

set theEVEclient to theEVEclient & (text theStart thru theEnd of theEVE)

set theStart to theStart + 5

set theEnd to theEnd + 5

end repeat

try

set fileRef to open for access file theOrder with write permission

set RecLine to InvoiceNo & " " & CustomerID & return

write RecLine to fileRef starting at eof

close access fileRef

on error

try

close file theOrder

end try

end try

Does anyone has an idea?

Thanks!

Daniel

Posted

In investigating further the problem I've found the following. I have the following script statement

set the_text to read file theOrderFile

and what is common with both scripts is the word "File". Is this possible that I cannot use the word file in an applescript executed by filemaker pro. If this is the case, what could be a replacement.

Thanks!

Daniel

Posted

I am only guessing here, but IIRC a script executed by Filemaker is by default within a "tell Filemaker" block. Try telling another application to read the file.

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