• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Bring FileMaker window to front
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bring FileMaker window to front


  • Subject: Re: Bring FileMaker window to front
  • From: Simon Forster <email@hidden>
  • Date: Sun, 7 Dec 2003 12:17:34 +0000

On 7 Dec 2003, at 00:18, Chris Garaffa wrote:

I'm writing an AppleScript that automatically inserts information from iTunes into three FileMaker databases. I can get the information from iTunes, but I've run into a problem where I have to manually select the database window I'd like the script to work in. Here's an excerpt of the script:

Chris

Check the AppleEvents FileMaker Pro database. Things to note:

- The difference between tell document and tell database. Document keeps the current state of the database - including found set etc.

- The object hierarchy. set cell of record 1 of document "Album" to...

As an eg:

tell database "Album"
activate
set theRecord to create new record at end of records
go to theRecord
set cell "artist" of theRecord to discArtist
--do the same for some of the variables set in the iTunes tell block above
set albumid to cell "albumid"
end tell

Becomes:

tell database "Album"
set theRecord to create new record at end of records
tell theRecord
set data cell "artist" to discArtist
--do the same for some of the variables set in the iTunes tell block above
set albumid to get data cell "albumid"
end tell
end tell

or, if you prefer:

tell document "Album"
show every record
create new record
tell record (count of records)
set data cell "artist" to discArtist
--do the same for some of the variables set in the iTunes tell block above
set albumid to get data cell "albumid"
end tell
end tell

Functionally these 2 snippets are similar.

Actually, this second example doesn't really show the difference between tell database and tell document as we're addressing the last record in the database. A somewhat more contrived example would be:

tell application "FileMaker Developer"
--hide every window
repeat count of window times
set visible of window 1 to false
end repeat
show window "Album"
show every record
do menu menu item "Show Omitted" of menu "Records"
tell document "Album"
create new record
set data cell "artist" to discArtist
--do the same for some of the variables set in the iTunes tell block above
set albumid to get data cell "albumid"
end tell
end tell

So my question is, how do I activate a window in FileMaker Pro (6.0 v1)?

If you really want to do this, the most foolproof way I know is:

repeat count of window times
set visible of window 1 to false
end repeat
show window "Album"

HTH

Simon Forster
____________________________________________
LDML Ltd, 62 Pall Mall, London, SW1Y 5HZ, UK
Tel: +44 (0)70 9230 5244 Fax: +44 (0)70 9230 5247
____________________________________________
_______________________________________________
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.

References: 
 >Bring FileMaker window to front (From: Chris Garaffa <email@hidden>)

  • Prev by Date: Re: Drive-by sig files
  • Next by Date: Re: Drive-by sig files
  • Previous by thread: Re: Bring FileMaker window to front
  • Next by thread: Re: Bring FileMaker window to front
  • Index(es):
    • Date
    • Thread