November 9, 200619 yr Let me start by saying that these applescripts worked last year before I moved to a newer Mac (both OSX). I have run these three scripts in the script editor, and they work fine. I'm thinking it may have something to do with permissions, but I can't remember. 1.tell application "FileMaker Pro" set chooseFile to cell "PathName" of current record of database "SRename.fp5" end tell tell application "Finder" set name of file chooseFile to "Rename.txt" end tell 2.do shell script "sudo chmod -R a+wr /Users/redcent/Sites/Documents/Rename.txt" password "******" with administrator privileges 3.tell application "FileMaker Pro" set newName to cell "FileName" of current record of database "SRename.fp5" end tell tell application "Finder" set name of file "Macintosh HD:Users:redcent:Sites:Documents:Rename.txt" to newName end tell I'm thinking it may have something to do with permissions, but I can't remember. Please help. Jane
November 13, 200619 yr Jane, If I get a chance to try this in FMP8.5/OS X.4 I will. I realize this isn't what you have. But a couple of security notes: having the admin password in an AppleScript means it can be opened by just about anyone who has physical access to your computer. I've done the same thing though, and recall there may have been some more secure way of doing it, but I can't recall -- if I find the reference, I'll post it. If you do continue to use this method, you may want to add a "-K" flag, so "sudo -K", which as I understand it, only executes the sudo privs for that instance, whereas otherwise sudo remains in effect for (I believe) 5 minutes by default. Ken
Create an account or sign in to comment