Jump to content
View in the app

A better way to browse. Learn more.

FMForums.com

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Opening Remote Database with AppleScripts

Featured Replies

Can anybody please shed some light on this one.

I'm trying to use Applescript to open a remote database on a certain day each week and automatically run a report. I am wording the Applescript to the format as per Filemakers Applescript dictionary, but the database is not actually opening. It is opening the remote access window and showing all the databases available but not actually opening the requested database.

My script is as follows:

tell application "Finder"

if weekday is Thursday then

tell application "FileMaker Pro"

activate

get remote URL "FMP5://[url address]/database.fp5"

end tell

else

display dialog "This script should only be run on Thursdays"

end if

end tell

>get remote URL "FMP5://[url address]/database.fp5"

You are putting the actual name of the database in here I presume as in "contacts.fp5" or the like?

But that syntax is not correct to open the file. Try this one instead:

getURL "fmp5@[email protected]/contacts.fp5"

substitute your password for password

substitute your URL for 12.34.56.78

substitute the name of your database for contacts.fp5

HTH

Old Advance Man

Remove "remote" from the script and just use "getURL"

tell application "FileMaker Pro"

activate

getURL "FMP5://ip_address_or_dns_name/database.fp5"

end tell

  • Author

Thanks for the help on this one guys. Spragueg's option worked but unfortunately the database is password protected and the "with password string" option doesn't seem to work with the "getURL" script commands!

Any ideas?

  • Author

I have the password thing sorted now. Next thing is more of a general Applescript query. I am trying to get the script to run the report only on a Thursday. My initial trial of the line:

if weekday is Thursday then

tell Filemaker..............

end if

This does not work!

How do I word the Applescript command to get the script to run only on a Thursday?

[ December 06, 2001: Message edited by: mad_mickey ]

I don't think there is any weekday function in Applescript, but you can calculate it as follows:

-- This will produce a number in the range 0..6 with Sunday=0

set dayofweek to ((current date - "December 31, 2000") mod 7)

-- and Thursday is 4

if dayofweek is 4 then

tell Filemaker..............

end

[ December 06, 2001: Message edited by: BobWeaver ]

word 1 of date string of (current date)

will yield the day of the week of the current date (as per the CPU clock)

HTH

Old Advance Man

You can get the three letter weekday(curDay) by using the following applescript...

set dateStamp to current date

set curDay to weekday of dateStamp

[ December 06, 2001: Message edited by: spragueg ]

  • Author

Cheers Fellas, I now have that one well and truly sorted!

  • Author

Sorry posted wrong message icon!!!

Create an account or sign in to comment

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.