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

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

Recommended Posts

Posted

About the only way I could think of doing something like this would be to put an applescript on each person's machine that mounts the volume with the necessary privileges. When the file opens a startup script calls the applescript to mount the volume.

I've never tried this, and my applescript skills are ~0, but it might just work.

Posted

It is actually pretty easy to write. It seems to work, at least most of the time :-] Put the following in a Perform AppleScript step in the FileMaker file, and run it as a File Options startup script. Obviously put your own machine's IP. This is for a Mac server. I believe 'smb:' works for Windows servers. I've commented out the 2nd one; you can remove comment marks.

--To force an Authentication dialog:

set sfiles to "afp://192.168.0.100"

--To bypass the dialog, put the real username and password in:

--set sfiles to "afp://username:[email protected]/Macintosh HD"

try

mount volume sfiles

end try

-- To do the opposite (maybe on closing)

tell application "Finder" to eject disks

Posted

I find that it is not very reliable the first time it runs when it's a startup script with Open Remote. It kind of needs to get slapped upside the head. It seems to work much better if you run it twice.

set sfiles to "afp://username:[email protected]/Macintosh HD"

try

mount volume sfiles

end try

delay 1

try

mount volume sfiles

end try

Posted

But scripts are specific to the database they are on right? So if you are going through the steps

Click on filemaker< press cancel when new databse screen opens< go to file< open remote< click on desired server< click on desired databse

the modified open remote script doesn't work.

or am I doing something wrong?

Posted (edited)

The statement "scripts are specific to the database they are in" is kind of vague. Yes, they are. But when you choose the "Print" command, does it print to a printer attached to the Server, or does it print to the one attached to your client computer? How about Export?

Almost all of these types of steps actually run from the client machine, in the environment of the client machine, its files, etc.. AppleScript is similar. So, if there is an AppleScript in a FileMaker Perform AppleScript step on a remote file, and the script it's in is specified as the script to run at startup, then that script is going to run when you first Open Remote that FileMaker file. The AppleScript is going to run from your client machine, and, in this case, is going to try and mount a volume on the client machine.

It works for me. But as I said, it's a little dodgy, and seems to need to run twice before it really does it.

Edited by Guest
Posted (edited)

so what you're telling me is that I need to store the apple script on the server machine that hosts the database?

see when I modified the open remote script I was unable to actually modify that specific script, I had to create a new open remote script and add the apple script step. When running the open remote it did not mount the external drives until apple 1 was pressed so I was a bit confused.

I moved the apple script to the host machine, but the process still does not run properly unless you have already gone through the file< open remote< server< database and then press apple K

Edited by Guest
Posted

I said: "Put the following in a Perform AppleScript step in the FileMaker file, and run it as a File Options startup script."

So I don't know why you'd be "moving" or "storing" the "AppleScript" anywhere else. The "AppleScript" does not exists as a file. It's in the FileMaker file, which is hosted. You use Open Remote to open it. OS file sharing is off on the FileMaker Server machine (I may have been using FileMaker Pro to host, but it should be the same thing).

Posted

Hahaha I'm sorry I wasn't thinking about what I was saying yesterday. the one step I missed was the setting the file options.

It works perfectly! thanks oodles!!!

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