MACSCRPT Archives

June 2006

MACSCRPT@LISTSERV.DARTMOUTH.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Bill Steele <[log in to unmask]>
Reply To:
Macintosh Scripting Systems <[log in to unmask]>
Date:
Tue, 6 Jun 2006 18:20:34 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (48 lines)
>On Jun 6, 2006, at 11:59, Bill Steele wrote:
>
>>I have a Filemaker script that works the first time you run it. 
>>Second time you run it on the same record gives an error "Data is 
>>being accessed by another user, script or transaction."  If you 
>>scroll to a previous record and back it works. If you open the 
>>script and look at it and try again it works.
>>
>>I have narrowed the problem down to a step in a "Perform 
>>Applescript" step that assigns a variable to a field, to wit:
>>
>>tell current record
>>set field "filename" to filename
>>end tell
>>
>>(This is a trick to move a variable from the Applescript to where 
>>another Filemaker script step can use it.)
>>
>>Apparently once it has done this it thinks the script is somehow 
>>still connected to that field, even though the script  finished 
>>running three minutes ago.  How do I convince it otherwise?
>>--
>>
>>Bill Steele
>>[log in to unmask]
>
>
>I really have not scripted FM since FM4... but, from your error 
>message, did you try a "transaction"?
>That is enclose your script with a "begin transaction" ... "end transaction".
>It might cure your problem...

Well, it gives me a clue. I entered "transaction" in Filemaker help 
and the first thing that came up was the exact error message I've 
been getting. Of the possible causes it lists, the only one that fits 
is

an Apple event arrives while a script is being processed.

Of course, that's sort of what I said in the beginning: even though I 
ran the script two minutes ago, it seems to think the script is still 
running and accessing that cell.

-- 

Bill Steele
[log in to unmask]

ATOM RSS1 RSS2