Apple script problems
bfr at nwlink.com
Sat Dec 20 06:32:13 EST 2003
>> I don't have FileMaker so I can't test this, but what do you get if you
>> get every record as string
>> in the AppleScript?
>> AppleScript has decided to give you a list and that may end up easiest
>> to process, but try coercing it to a string and see what happens.
>> sarahr at genesearch.com.au
> You are a champ, proving the superiority of string theory! It returns
> a tab/return delimited string.
> Unfortunately, for a big file, I get an "execution error." But I got
> that without the "as string." I don't think this is a Run Rev
> capacity problem. I am able to import the file into a varaibe (or a
> field). I suspect that AppleScript has limits on string lengths.
> Back to the tried-and-true--importing a text file.
1. You seem to be having difficulty with applescript 101 text handling.
2. You are making FileMaker operate inefficiently and do multiple operations
when it isn't necessary.
3. You haven't described any detail about the scope of this operation? How
many records, how many fields?
2. You aren't describing the runrev end of things. What is the applescript
in RR to make your new record? What data do you need to feed to it?
Tell app "FileMaker Pro"
Copy every record of document "xyz.fp5" to mydata
-- result is a list
-- do NOT coerce to string yet
-- we're through with FileMaker
Set applescript's text item delimiters to tab
Copy count of myDate to rowCount
Repeat with num from 1 to rowcount
Copy (item num of mydata) at text to temp
-- 1 tab delimited record
-- what do you want to do with it?
-- well now what?
More information about the Use-livecode