Re: FileMaker Pro 8 and Do Scripts Errors!
Re: FileMaker Pro 8 and Do Scripts Errors!
- Subject: Re: FileMaker Pro 8 and Do Scripts Errors!
- From: Jason Bourque <email@hidden>
- Date: Mon, 26 Sep 2005 18:17:58 -0400
- Thread-topic: FileMaker Pro 8 and Do Scripts Errors!
On 9/26/05 11:11 AM, "Gary (Lists)" <email@hidden> wrote:
> "Jason Bourque" wrote:
>
>> I get this error when trying to set cell data after a do script call. Any
>> Ideas?
>
> I am a fan (and advocate) of the 'Do Script' command. However, I don't
> think is an efficient use of that command.
>
> 1. Check the syntax. Unless it changed in FM8, the actual command in all
> prior versions was:
>
> Do Script FileMaker Script "New Record"
FMP8
do script: Execute a script
do script string
>
> (You don't get a syntax error, so it's probably changed...which is
> good...the command was always stupidly redundant in its name anyway.)
>
> 2. Do Script is really intended as a means to 'marry' the internal FM
> scripting engine (Script Maker) with AppleScript. It's best used when you
> want to invoke some 'custom action' or do from outside FM what your users
> could do from inside (via a button, for example.)
>
> Using 'Do Script' to make a new record is inefficient on several levels.
I agree. I consider my self more than efficient in both scripting languages.
So there's more to the surface here. A new record in my database requires
multiple fields (7) to be populated with the script "New Record" the custom
function as you call it. The script can be called from any layout with our
without the fields that are affected. This script also reacts differently
when called from different layouts. I did it this way so I could maintain it
from FMP which does the most of the scripting.
Jason Bourque
>
>
>> "FileMaker Pro got an error: Data is being accessed by another user, script,
>> or transaction."
>
> (FYI, FM does have transactional locking via AS. That is _not_ what you need
> here, but just so you know you can wrap blocks in a 'transaction'.)
>
>> tell application "FileMaker Pro 8"
>> activate
>>
>> tell database "To Do List.fp7"
>>
>> do script "New Record"
>>
>> delay 1
>>
>> tell window 1
>> tell current record
>> set cell "Task Name" to vTextSelection
>> set cell "Requested By" to vSendersFirstName
>> set cell "Task History" to vEmailContent
>> end tell
>> end tell
>> end tell
>> end tell
>
>
> No good. Too long. ;)
>
> Here is a much more efficient and short AS to do the same task.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden