Jump to content

Filemaker Server and Apple Script


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

Recommended Posts

Hello

I need to run a daily script to unmount and mount a volume using applescript. The script runs fine in AppleScript but does nothing (as far is I can tell) in a scheduled script in FM server.

Is this a problem of location of the files (on the server) that causes the AppleScript to not function?

Testing the same on a local copy of the file works just fine.

The script I'm trying to run inside FM:

tell application "Finder"
	try
		eject disk "directie"
	end try
end tell

set my_volumes to "directie"
set the_volumes to list disks


if my_volumes is not in the_volumes then
	
	try
		mount volume "smb://192.168.0.169/directie" as user name "directie" with password "Vekabestadm2016!"
	end try
	
end if

 

Thanks!

Link to comment
Share on other sites

I'm assuming you are using a system script schedule on FMS?  Then the script itself can only be in one location: the FMS scripts folder.  If it is not there you wouldn't be able to select it when you set up the schedule.

This could be a permissions issue: both on the script file itself (owner and group has to be fmserver / fmsadmin ) and the script will be executed in the context of that fmserver user.  That user needs the proper rights to do what you want; which it may not have.

  • Like 1
Link to comment
Share on other sites

Thanks Wim,

 

I assumed that because I was able to select the script in the server (using my admin username/password) I would be able to run it. I didn't think about the user rights on the machine itself as script maker ran the script on the FMS just fine. I'll look into the this now. Thanks for helping!

Link to comment
Share on other sites

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