I usually write my scripts in Script Editor but then paste them into the 'perform applescript' script step for exactly this reason - you don't have to keep track of external files. Especially helpful in multiuser environments; way better than going around to every user's desktop when there is a script change.
Well I thought I knew almost everything about FileMaker and now I *am* just a little closer to everything.
I'm sure I saw the 'perform applescript' command but I must just never have absorbed it.
I copied the script (that worked under OS 10.5 and didn't work under 10.6) into the script step and and it worked under FileMaker. Bizarre, plus it was a screamer. I've never seen an Applescript work that fast on FileMaker altho it might be because I upgraded to FileMaker 10 to see if that would help.
Thanks a bunch.
Count so far:
10.6 causes 5 things to break. (not just in FileMaker)
3 down and 2 to go.
Hi Chuck, the reason it's so much faster is because it doesn't have to actually launch another application (the AppleScript application) - it runs inside the FileMaker application, so there's no startup delay.
I'm glad that worked for you!
Here's one that's got me going mad. I have a calculated applescript to get the name of the local computer and paste it into a FileMaker field:
"tell application " & Quote("FileMaker Pro") & ¶ &
"set theDoc to item 1 of (documents whose name starts with " & Quote(Get ( FileName )) & ")" & ¶ &
"set cell "& Quote("OfficeLocation") & " of current record of layout " & Quote("devOrders") & " of theDoc to do shell script " & Quote("networksetup -getcomputername") & ¶ &
this errors every time I run it, yet if I put it in as a native script, without the option for variables like:
tell application "FileMaker Pro Advanced"
set theDoc to item 1 of (documents whose name starts with "ION")
set cell "OfficeLocation" of current record of layout "devOrders" of theDoc to do shell script "networksetup -getcomputername"
...it works perfectly fine. This MUST be a Snow Leopard issue. When will it be fixed? Is there a workaround? I need to be able to use the variables for differing local computers. Ugh!!