News
On June 1, we’re asking you to select a content label when starting a new topic in the Discussions area. Read more to find out why.
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
0 Kudos
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
julian
Staff

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
Staff

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
0 Kudos