2 Replies Latest reply on Feb 1, 2010 10:03 AM by mk@smydia.com

    Specify Applicaction "Finder" sending an event (Mac OS X)

    mk@smydia.com

      Title

      Specify Applicaction "Finder" sending an event (Mac OS X)

      Post

      FM 10, Mac OS X: 

       

      Here my (probably) stupid question:

       

      I want use an event to open a specific folder in the "Finder".

      There is a Folder related to every record.

      I select "open document" and using a Variable i have no problems to localize that folder on my Harddisc.

      BUT how can I get the Finder to OPEN it ? ? ?

      It would seem logical to click "specify Application" and then to choose the Finder, but this is not possible, because the Finder doesn't show up as an application. Actually, the Finder doesn't show up at all in the Finder!

      So, how can I tell my event, that I want to use the Finder as specific application?

      (I believe that should be possible using an Apple Script, but then, how do I  get  my Variable into  that Script?) 

       

      Thanks for every help! 

        • 1. Re: Specify Applicaction "Finder" sending an event (Mac OS X)
          FentonJones
            

          If I put an AppleScript Mac style path into a script Variable, I can use it in a Perform AppleScript script step, if I use the (•) Calculated AppleScript option. The only difficulty is with getting quote marks and paragraph returns in where necessary. I used 2 different methods for the quotes, as seemed easiest to me.

           

          "tell application \"Finder\""  & ¶ & 

          "open " & Quote ( $mac_path ) & ¶ & 

          "activate" & ¶ & 

          "end tell" 

          • 2. Re: Specify Applicaction "Finder" sending an event (Mac OS X)
            mk@smydia.com
              

            Thank you for helping!

             

            The idea of using the AppleScript Steps in the Variable is very convincing and I  tried it out.

            I was definitively getting closer to a solution, but the Script did never accept the complete path.

             

            I used then the way a path is described when I use the Script Editor

            (something like:

             

            tell application "Finder"

            activate

            make new Finder window to disk "Transfer"

            set target of Finder window 1 to folder "FolderName" of folder "2100" of disk "Transfer"

            end tell) 

             

            I  have copied this into my Variable, placing very carefully every return "¶" and using a Global Field for the quotation marks, and - of course - replacing the folder names by  calculated values... AND IT WORKS!

             

            Thanks again, Fenton Jones!

             

             

             

            Congratulations to your 1 aniversary in this Forum ;-)