Bring FileMaker window to front
Bring FileMaker window to front
- Subject: Bring FileMaker window to front
- From: Chris Garaffa <email@hidden>
- Date: Sat, 6 Dec 2003 19:18:11 -0500
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:
tell application "iTunes"
--set a bunch of variables, such as discYear, discTitle, discArtist,
etc
end tell
tell application "FileMaker Pro"
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
tell database "Disc.fp5"
activate
set theDiscRecord to create new record at end of records
go to theDiscRecord
set cell "discnumber" of theDiscRecord to discNum
--do the same for some of the other variables in the iTunes tell
block above
end tell
end tell
I get: "FileMaker Pro got an error: Object not found." on the line:
set cell "discnumber" of theDiscRecord to discNum
Going back into FileMaker, I noticed that Album is still the active
window. I confirmed this by trying to set the value of a cell that
exists in the Album database from within the Disc tell block.
So my question is, how do I activate a window in FileMaker Pro (6.0 v1)?
Thanks
--
Chris Garaffa
email@hidden
_______________________________________________
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.