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

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

Recommended Posts

Posted

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

Posted

>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

Posted

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

Posted

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?

Posted

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 ]

Posted

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 ]

Posted

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 ]

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