Jump to content
Sign in to follow this  
lmead

Use default password to open database

Recommended Posts

I want to use AppleScript to open a database that opens with a default password. I want to do this so that I don't have to type the password into the AppleScript. However, when I try this I get the error message: "FileMaker Pro got an error. The event failed". If I type the password into the AppleScript, it will open the database.

Share this post


Link to post
Share on other sites

What I want to accomplish is to shut down the server, startup the client, open a database (Utility) using the preference "try default password", use a startup script in the database (Utility) to open other files and depending on the day of the week run certain scripts, quit client, and, finally, re-start server.

Below is the AppleScript I am using:

tell application "FileMaker Server 5:FileMaker Server"

quit --

end tell

tell application "FileMaker Pro 5 Folder:FileMaker Pro"

activate --

open "FileMaker Server 5:FMP Systems:Utility" --

end tell

sleep while running application "FileMaker Pro" --

tell application "FileMaker Server 5:FileMaker Server"

activate --

end tell

If I put this command instead, the AppleScript works:

open "FileMaker Server 5:FMP Systems:Utility" with password "my password" --

[ November 14, 2001: Message edited by: lmead ]

Share this post


Link to post
Share on other sites

I'm assuming that "Utility" is a Filemaker database file.

Try this:

code:

tell application "FileMaker Server 5:FileMaker Server"

quit

end tell

--get the Finder to do the work!

tell application "Finder"

open "FileMaker Server 5:FMP Systems:Utility" as alias

end tell

sleep while running application "FileMaker Pro"

tell application "FileMaker Server 5:FileMaker Server"

activate

end tell


The finder will launch Filemaker Pro in order to open the Utility file. To Filemaker, that will look like utility was launched by double clicking it on the desktop, and Filemaker will then go through it's normal procedure of trying the default password. The trouble with sending applescript commands directly to Filemaker is that it may bypass some of its normal procedures such as trying the default password. Sometimes thats a good thing, sometimes not.

[Edit info: Added "...As Alias" to script]

[ November 14, 2001: Message edited by: BobWeaver ]

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Who Viewed the Topic

    1 member has viewed this topic:
    Matt Cudmore 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.