Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

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

Recommended Posts

  • Newbies
Posted

I'm having a problem at a customer. He uses a professional FileMaker database with a FileMaker Server and FileMaker Client 5.5, both on Mac OS X 10.3. I (poorly) don't know, what's happening in this database.

When the user opens the database with the Hosts-Menu, everything works well. I wanted to make it easier for the customer to open the database with an AppleScript, so that he does not have to use the way with Open-Menu, click Hosts and than look in the list of databases for the correct one.

This script looks like this:

tell application "FileMaker Pro"

open database "userdatabase.fp5"

end tell

But what happens if I use this one, is that I get an access problem in one of the databases (userdatabase.fp5 is not only one database, but is the menu-database). I get an error, that I cannot modify the database because I do have only read access or the database is protected.

I tested it on several machines with different FileMaker-versions: It happens definitely with using the script.

Has anyone an idea what's happening here?

Thanks

Posted

Jurinicia:

Welcome to the Forums.

You've got the right idea, but the wrong implementation. What you want to do is use an Opener File. There are a number of threads regarding this on the Forums, but I'll summarize for you.

On the client machine, create an FMP file. In this file, create a script. In the script, put the command:

Open ["userdatabase.fp5]

(In the dialog, navigate via Hosts to your hosted database & select it)

You can also add the command:

Close []

Which will close the file calling the script.

In preferences->File, tell the file to run the script on startup. Now, put the file somewhere so the user will double-click on that file instead of on the FMP icon (the right-hand side of the dock, for example) and when they open the file, it will take them directly to the hosted db.

There's alot more that can be done in an opener (error capture, for example), but that is the basic idea.

-Stanley

  • Newbies
Posted

Thank you for the answer Stanley.

The idea is a very good one, but not the answer for my question. For me it is important to understand, what happens and why the script produces an error in database access.

The script does not do any special or irregular, it works like it is documented for AppleScript.

May be anyone has an explenation for the behaviour?

Thank you

Posted

Jurinicia:

If I understand right, you are attempting to open a file which is hosted on the server, but you want to open it directly via AppleScript. The message you are getting is that the file will be read-only, right? It sounds to me like you are encountering a permissions problem which, considering that you are accessing a server directly, is what you should expect to happen.

However, this is NOT the proper way to open a database which is being hosted by FileMaker Server. Opening such a file this way will corrupt the data and ruin your files. You are best off doing what I suggested in my previous post, which is to construct a simple opener file in FileMaker.

Just for the academic point, though, to do what you are asking, go to the file in question and change its permissions, and you should no longer get the error message.

-Stanley

  • 1 month later...
Posted

If you look at FileMaker's Applescript dictionary, you'll find the syntax:

getURL "fmp7://UserName:Password@IPAddress/MyFile.fp7"

This should help you out.

Posted

If you look at FileMaker's Applescript dictionary, you'll find the syntax:

getURL "fmp7://UserName:Password@IPAddress/MyFile.fp7"

This should help you out.

Posted

If you look at FileMaker's Applescript dictionary, you'll find the syntax:

getURL "fmp7://UserName:Password@IPAddress/MyFile.fp7"

This should help you out.

This topic is 7198 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.