Andrew5 Posted May 28, 2008 Posted May 28, 2008 Is it possible to have a button in FM9 to open the Finder? I have a client file system and the client's files from iWork, PDF's etc. are there. It would be nice to have a button in a layout that would open the particular client's folder in the Finder. Possible?
mz123 Posted May 28, 2008 Posted May 28, 2008 You will probably have to use AppleScript and use FileMaker to create the filepath.
Fenton Posted May 28, 2008 Posted May 28, 2008 As Martha says, use one of the FileMaker functions to determine the user's OS name (different for everyone). These would be: Get ( DocumentsPath ) Get ( DesktopPath ) The AppleScript would look something like this: tell application "Finder" open folder "Macintosh HD:Users:fej:Desktop:Registrations xml:" activate end tell The "activate" is to bring the Finder to the front, so you can see the folder. The folder path could be produced by writing the above as a calculation, in the Perform AppleScript step. In which case you need to escape the quotes, and explicitly add the paragraph returns (AppleScript is a line-based). If the folder is the ClientName, within the Documents folder, the calculation would look like: Let ( [ docs = Get (DocumentsPath); docs_Mac = Right ( Substitute ( docs; "/"; ":"); Length (docs) - 1) ]; "tell application "Finder"¶ open folder "" & docs_Mac & ClientName & ":"¶ activate¶ end tell" )
Andrew5 Posted June 13, 2008 Author Posted June 13, 2008 Thank you very much. Sorry it took so long for the thank you to arrive....!
Fenton Posted June 13, 2008 Posted June 13, 2008 You're welcome. You might want to search for recent posts, for one of my posts that told how to create the folder (when needed) from a FileMaker field.
Recommended Posts
This topic is 6009 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 accountSign in
Already have an account? Sign in here.
Sign In Now