Jump to content

Use default password to open database


This topic is 8192 days old. Please don't post here. Open a new topic instead.

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.

Link to comment
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 ]

Link to comment
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 ]

Link to comment
Share on other sites

This topic is 8192 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

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