I have a calculated script in FileMaker 11 Advanced:
property theImg : {}
tell application “Image Events”
set theImg to open alias “H-DSpudConte38374S.jpg” of folder “H-D_Spud_Contest” of folder “04” of folder “2011” of folder “biker_events_rallies” of folder “Articles” of folder “WEB-TPI-LiveSite” of disk “MothraShare”
set imgInfo to dimensions of theImg as text
close theImg
end tell
imgInfo → {dimensions:{981.0, 922.0}}
tell application “FileMaker Pro Advanced”
set cell “ImageDimensions” of current record to imgInfo
end tell
the image name and file path are all calculated on a per record basis and it runs on a loop through a series of records…
It works great… some of the time… but periodically, I get an error -2753 “The variable is not defined. (-2753)” except that the variable IS defined globally in the line “property theImg : {}”
I’ve occasionally gotten the same error when testing the exact same script through Applescript (as in copy/paste from a calculation field in FileMaker getting the exact info the script would receive as it runs through its loop), but if I quit Applescript and relaunch it and paste the same script into a new script window it will run fine. Because of this I’m not sure if it’s a FileMaker issue, an Applescript issue, or even possibly an issue with my computer itself… any input would be MUCH appreciated!
Thanks
Zeyhra
2(Mac Mini OSX 10.5.8 with FileMaker Pro 11) + Mac Mini OSX 10.5.8 with FileMaker Pro Advanced 11 + Mac Mini OSX Server 10.6.7 with FileMaker Server Advanced 11