Jump to content

Open Remote with AppleScript


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

Recommended Posts

Anyone know how to open a database on FM Server using AppleScript. The following works for a local database, but there is not a similar Open Remote command in the FMP dictionary

property DBPath B) "Macintosh HD:Users:syounker:Desktop:Home:My Database.fp7"

property DBAccount : "My Account"

property DBPW : "Password

open file DBPath for Accounts DBAccount with passwords DBPW

Link to comment
Share on other sites

Syounker:

You're better off using an opener file, which (if you really need to) can be opened with an AppleScript. The reason is that you don't actually want to open the file on the server via OS-level file access, but via FileMaker's internal networking system.

-Stanley

Link to comment
Share on other sites

Where I work, we're on a large network and getting a response from "Open Remote" is slooooow. This is because filemaker has to ping every device to display a complete list. Even if you're opening just one file, it still does this. Now you can specify just the file you want to open, and it's MUCH faster on a large network.

Here's a better opener script... send a Script Parameter that is the IP address of the server and the filename you want to open... like "10.0.0.45/MySolution.fp7" In my script, I check for platform and use the right call, on Mac, use applescript, on Win, open as URL.

The script looks like this...

if [Abs(Get ( SystemPlatform )) = 1]

perform applescript ["getURL "fmp7://" & Get ( ScriptParameter ) & """]

else

Open URL [No Dialog; "fmp7://" & Get ( ScriptParameter ) & """]

end if

Link to comment
Share on other sites

Where I work, we're on a large network and getting a response from "Open Remote" is slooooow. This is because filemaker has to ping every device to display a complete list. Even if you're opening just one file, it still does this. Now you can specify just the file you want to open, and it's MUCH faster on a large network.

Here's a better opener script... send a Script Parameter that is the IP address of the server and the filename you want to open... like "10.0.0.45/MySolution.fp7" In my script, I check for platform and use the right call, on Mac, use applescript, on Win, open as URL.

The script looks like this...

if [Abs(Get ( SystemPlatform )) = 1]

perform applescript ["getURL "fmp7://" & Get ( ScriptParameter ) & """]

else

Open URL [No Dialog; "fmp7://" & Get ( ScriptParameter ) & """]

end if

Link to comment
Share on other sites

Where I work, we're on a large network and getting a response from "Open Remote" is slooooow. This is because filemaker has to ping every device to display a complete list. Even if you're opening just one file, it still does this. Now you can specify just the file you want to open, and it's MUCH faster on a large network.

Here's a better opener script... send a Script Parameter that is the IP address of the server and the filename you want to open... like "10.0.0.45/MySolution.fp7" In my script, I check for platform and use the right call, on Mac, use applescript, on Win, open as URL.

The script looks like this...

if [Abs(Get ( SystemPlatform )) = 1]

perform applescript ["getURL "fmp7://" & Get ( ScriptParameter ) & """]

else

Open URL [No Dialog; "fmp7://" & Get ( ScriptParameter ) & """]

end if

Link to comment
Share on other sites

I tracked down the full syntax of the GetURL AppleScript command.

You can store it in a property or call it from FMP and use fields you have defined in your database.

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

Link to comment
Share on other sites

I tracked down the full syntax of the GetURL AppleScript command.

You can store it in a property or call it from FMP and use fields you have defined in your database.

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

Link to comment
Share on other sites

I tracked down the full syntax of the GetURL AppleScript command.

You can store it in a property or call it from FMP and use fields you have defined in your database.

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

Link to comment
Share on other sites

  • 4 months later...

Hey

I'm trying to do the same But i don't understand what you guys are talking about !!!???

Before, the file was locally on my machine so the script was:

tell application "FileMaker Pro"

open file "users:guy:FileMakerPro_DataBase:wood_projects_master.fp7"

end tell

But now the file is beeing serve by FMP 7.0 server

So,now, I have , to "open remote", instead.

Here is the path over the network:

fmnet:/192.167.0.149/wood_Projects_Master

Could you tell me what i have to do to make it work with a applescript

thx in advance

guy

Link to comment
Share on other sites

So,now, I have , to "open remote", instead.

Yes you have to since a OS level path to server is no no, the machine that hosts the filemaker solution should have the directory/folder where the filemaker file lives taken out of OS level filesharing.

I'm with Stanley on this one, use an "Opener" ...because two concurrent systems that both uses each their own method to create balanced syncronity ...it is similar to people putting a door back on it's hinges, both overcompensates for the others movements. Translated to filemaker is it a source for getting a corrupt file in a hurry!!!!!

--sd

Link to comment
Share on other sites

  • 3 months later...

I've been trying to solve this same problem: how do I "open remote" an FM file on another Mac on ouut network. To make things even more difficult, all the Macs on our network have dynamic IPs assigned—so they change every day, or every time the Mac is restarted. I can script the mounting of a volume using an AFP address like this:

mount volume "afp://username:[email protected]/Joe's HD"

This will work regardless of the IP address Joe's computer is assigned. Is anything like this possible to "open remote" and FM7 file?

Link to comment
Share on other sites

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