Script to open folder in OSX
I know absolutely nothing about applescript or scripting in general for that matter. I'd like to set up a button in filemaker that will open a folder in OSX. The folder is on a PC server but can be mounted as a volume in the finder. The folder names correspond to a file id number in a filemaker database. What i'd like the button to do is get the value of the file id number in the current table and pass that value to an applescript that will open the folder with that id number. I hope that makes sense. I've been playing around with some scripting ive found on the internet. I've got the script in two parts basically.
This part of the script gets the file id number from the first record in the table. What i need is for it to get the value of the current record.
tell application "FileMaker Pro Advanced"
tell database "ordertracker"
tell table "mylars"
This part of the script opens the folder but what i need is for the number "067" to be the variable retrieved from the first step.
tell application "Finder"
set my_folder to "CP-Mylars:067:web Layout & 1up:"
open folder my_folder
Also, is there a way to make this work if the volume is not currently mounted?
Any help would be greatly appreciated.