Re: Bring FileMaker window to front
Re: Bring FileMaker window to front
- Subject: Re: Bring FileMaker window to front
- From: Nigel Smith <email@hidden>
- Date: Wed, 10 Dec 2003 15:43:32 +0000
On 7/12/03 0:18, "Chris Garaffa" <email@hidden> wrote:
>
So my question is, how do I activate a window in FileMaker Pro (6.0 v1)?
Why bother bringing it to the front? Just tell FMPro where you want the
record added:
tell application "Filemaker Pro"
set theDiscRecord to create new record at database "Disc.fp5"
--set your cells from your variables
end
And there is no need to create the record, then populate the cells -- do it
all in one go:
tell application "Filemaker Pro"
create new record with data {"Hello","World"} at database "Disc.fp5"
end
And if you get your iTunes variables into a list, one list item per entry
you want to make in the database:
tell application "FileMaker Pro"
repeat with x from 1 to count of iTunesList
create new record with data (item x of iTunesList) <linebreak>
at database "Disc.fp5"
end repeat
end tell
You may have to fiddle to get the list order to match up with the field
order. Easiest way is to look at the first record in your db and compare it
to the output of:
tell application "FileMaker Pro"
return record 1 of database "Disc.fp5"
end tell
You don't have to include data for every field on the record in your list,
but if you want to fill in some but not others you may have to pad with
blanks. To fill fields 1,3 and 5 of a seven-field db you could use:
create new record with data {"1","","3","","5"} at database "Disc.fp5"
HTH,
Nigel
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.