Our World Statistics Day conversations have been a great reminder of how much statistics can inform our lives. Do you have an example of how statistics has made a difference in your life? Share your story with the Community!
Choose Language Hide Translation Bar
Highlighted
David_Burnham
Super User

Launching a Finder Window on MacOS using JSL

I often find it useful to launch a window containing files in a specific folder.  On windows it is trivial, you just provide the directory path as input to the Open function:

open( convertFilePath("$Documents") )

This doesn't work on MacOS.

Any ideas how I can achieve the same outcome on a mac?

-Dave
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
julian
Community Manager Community Manager

Re: Launching a Finder Window on MacOS using JSL

Hi @David_Burnham,

Here's a method I've used with my Mac scripts using RunProgram():

exampleDir = Pick Directory();
RunProgram( Executable( "/usr/bin/open" ), options( {exampleDir} ) );

@julian 

View solution in original post

2 REPLIES 2
Highlighted
julian
Community Manager Community Manager

Re: Launching a Finder Window on MacOS using JSL

Hi @David_Burnham,

Here's a method I've used with my Mac scripts using RunProgram():

exampleDir = Pick Directory();
RunProgram( Executable( "/usr/bin/open" ), options( {exampleDir} ) );

@julian 

View solution in original post

Highlighted
David_Burnham
Super User

Re: Launching a Finder Window on MacOS using JSL

Thanks Julian.

-Dave
Article Labels

    There are no labels assigned to this post.