August 15, 200619 yr i'd like to have the external volumes that refrenced files are stored on open and mount when a user opens the database remotely.
August 15, 200619 yr 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.
August 16, 200619 yr 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
August 16, 200619 yr 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
August 23, 200619 yr Author 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?
August 23, 200619 yr 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 August 23, 200619 yr by Guest
August 23, 200619 yr Author 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 August 24, 200619 yr by Guest
August 24, 200619 yr 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).
August 24, 200619 yr Author 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!!!
Create an account or sign in to comment