MACSCRPT Archives

April 2011

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:
Fri, 1 Apr 2011 09:09:21 -0400
Content-Type:
text/plain
Parts/Attachments:
text/plain (58 lines)
I did try inserting delays. Sometimes it worked, sometimes not, or worked a few times and then failed. Is it possible that Filemaker slows its response as the memory fills up?

Again, it must be something that changed since FM9.

On Mar 31, 2011, at 7:48 PM, Mark Lively wrote:

> On Mar 31, 2011, at 4:51 PM, Bill Steele wrote:
> 
>> I have a database in which each record represents a story in a magazine. A portal links to a photo database to show photos that go with the story.
>> 
>> To extract data I have an Applescript like so (oversimplified to one field and no repeats):
>> 
>> tell application "FileMaker Pro"
>> 
>>  tell database "Stories"
>>     tell current record
>>        set storyTitle to cell "title"
>>        do script "RelatedRecords"  --Filemaker script: Go to related record; show only related records
>>     end tell
>>  end tell
>> 
>>  tell database "Photos"
>>     set oneCaption to cell "caption" of current record
>>  end tell
>> 
>> end tell
>> 
>> This worked find with Filemaker 9 on Leopard. Now we've upgraded to Filemaker 11 and Snow Leopard. 
>> 
>> And now the above fails on the first attempt to read the related records with "Data is being accessed by another user, script or transaction."  
>> 
>> Worse, *sometimes* it works. For a while. I can sometimes jump start it by scrolling to an earlier record in the database and then back, or by quitting Applescript Editor and then starting it again. The actual script has a lot of looping through records, and when it does work it's good for about 4 or 5 photos and then it dies. I thought "memory issue," but sometimes it just won't run at all, even from a fresh start. Including a restart of the computer.
>> 
>> Suggestions?
>> 
> 
> It looks like filemaker is returning before the processing is done.
> 
> Two options that I found fixed it
> 
> 	tell me to delay .01  --Shorter didn't work for me, I doubt longer would be required.
> 
> --or--
> 
> 	repeat  --between the tells. should always work.
> 		try
> 			get name of window 1
> 			exit repeat
> 		end try
> 	end repeat
> 
> 
> -Mark
> Just a jump to the left...

Bill Steele
[log in to unmask]

ATOM RSS1 RSS2