AnsweredAssumed Answered breaks Applescript 'open' command

Question asked by VincentAngeloni on Oct 29, 2012

Summary breaks Applescript 'open' command


FileMaker Pro

Version FMPro Adv

Operating system version

OS X 10.8.2

Description of the issue

This applescript worked just fine until I updated to FMPro Adv

tell application "FileMaker Pro Advanced"
   delay 5
   open alias "OS X:Users:vangelon:Documents:Filemaker files:Pword.fmp12" with passwords "blahblahblah" for Accounts "myaccount"
end tell

The "open" line chokes saying "Apple event timed out" and it puts up the 'Open File' dialog in Filemaker. So it is not getting the file to open or putting in the account and password info in the background like it was supposed to.

Steps to reproduce the problem

Run the applescript above and line with "open" fails

Expected result

Expect FMPro to open the file without asking for user account or password

Actual result

Applescript error and file does not open, the open file dialog appears in FMPro

Exact text of any error message(s) that appear

FileMaker Pro Advanced got an error: AppleEvent timed out.  (this error appears in Script Debugger 5... Filemaker app launches but does not open the file like it used to.


GUI scripting works, but it is ugly.

tell application "Finder"
open "OS X:Users:vangelon:Documents:Filemaker files:Pword.fmp12" -- change path here
delay 5
end tell

activate application "FileMaker Pro Advanced"
tell application "System Events"
tell process "FileMaker Pro Advanced"
set value of text field 1 of window "Open “DATABASE_NAME”" to "ACCOUNT_NAME" -- insert account name here, insert DATABASE_NAME ("myDB" if file opened is "myDB.fmp12")
set value of text field 2 of window "Open “DATABASE_NAME”" to "PASSWORD" -- insert password & database name here
click button "OK" of window "Open “DATABASE_NAME”" -- insert database name here
click button "Find" of tool bar 1 of window "DATABASE_NAME" --insert database name here, too
keystroke tab -- forward tab key, moves to first text field so user can type search term, alter or delete this line if you want to start searching another field
end tell
end tell