Re: Applescript, FileMaker and Snow Leopard
Re: Applescript, FileMaker and Snow Leopard
- Subject: Re: Applescript, FileMaker and Snow Leopard
- From: Bruce Robertson <email@hidden>
- Date: Mon, 8 Feb 2010 14:05:44 -0800
On Feb 8, 2010, at 11:39 AM, email@hidden wrote:
> I upgraded to Snow Leopard over the weekend and, for the most part, everything went smoothly. However, an AppleScript that ran perfectly fine the day before no longer works. Here are the particulars:
>
> OS 10.6.2
> FMPA 8.5v2
> Dialectic 1.5
>
> This script is triggered by an incoming phone call through Dialectic which finds the callers records in a FMP db.
>
> on handle_incoming_call_action(contact_name, contact_number, phone_or_modem_name)
>
> tell application "FileMaker Pro Advanced"
> activate
> try
>
> go to database "Call Log"
> go to layout "Data Entry"
> go to current record -- (this forces FMP into Browse mode)
>
> set cell "g_Dialectic_Number" of current record to contact_number
> set cell "g_Dialectic_Name" of current record to contact_name
>
> go to database "Invoices"
> do script "Dialectic Caller ID Lookup"
> -- this script finds the caller's record(s), if they exist.
> -- It also creates a new entry in the Call Log db.
>
> end try
> end tell
>
> end handle_incoming_call_action
>
>
>
> Here are the problems I'm experiencing:
>
> • go to current record -- This used to force FMP into Browse mode but no longer works in 10.6. It now opens my 'Prefs' db.
> • set cell -- Does not produce any errors in AppleScript Editor, but it doesn't do anything in FMP anymore
> • do script "Dialectic Caller ID Lookup"
> --> error "Object not found." number -1728
>
> No matter which of my scripts I try to run in the 'do script' step, I get the same error message, so it's not that the script is incorrectly named or that it's not there.
>
> Any help would be greatly appreciated.
>
> Thanks,
> Marc
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> AppleScript-Users mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
> Archives: http://lists.apple.com/archives/applescript-users
>
> This email sent to email@hidden
Your do script statement has never been correct. The correct form is
do script fileMaker script "MyScript"
or
do script fileMaker script ID 123
For many field operations a table reference is better and easier, certainly so for global fields.
set cell "MyField" of table "MyTable" to "Something"
Note that the name of the table must be the name of a table occurrence that is on the graph.
An advantage is that the field doesn't have to be on the layout.
There is no current record for a global field.
The command is set data
set data cell "g_Dialectic_Number" to contact_number
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden