Jump to content

Open Folder in Finder with Applescript via Filemaker


ccb

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

Recommended Posts

  • Newbies

I can open a folder in Finder just fine by executing the following AppleScript:

tell application "Finder"

activate

set my_folder to "Volume:Sample Folder:"

open folder my_folder

end tell

My problem is... In Filemaker, I have a script that uses Troi's File Plug-in to search for a particular Folder and the resulting path is placed in "gSearchResults" which is a global text field. from there, I perform an AppleScript to goto finder and open the folder. However, the following gives me the error: "The variable gSearchResults is not defined. (Error -2753). I'm new to AppleScript, what is wrong?? All I want to do is to open a folder in finder from FileMaker. Is there a better way?

tell application "Finder"

activate

set my_folder to gSearchResults

open folder my_folder

end tell

Thanks for any help!

Link to comment
Share on other sites

first, you have to put the content of gSearchResults in a variable.

tell application "FileMaker Pro"

set my_folder to cell "gSearchResults" of current record

end tell

then, ask the Finder to open the folder :

tell application "Finder"

activate

open folder my_folder

end tell

Jean-Marie -HOO;-)

Link to comment
Share on other sites

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