Open up a Finder/Explorer window

Discuss any general programming issues here

Open up a Finder/Explorer window

Postby Figgy78 » Mon Nov 27, 2017 3:01 pm

Hi!

Does anyone have any idea on how I would go about opening a Finder/Explorer window at a specific path from within Hollywood?

I can't seem to find the correct function for this.

Thanks!
Figgy78
 
Posts: 30
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Postby PEB » Mon Nov 27, 2017 8:09 pm

PEB
 
Posts: 160
Joined: Sun Feb 21, 2010 2:28 am

Re: Open up a Finder/Explorer window

Postby Allanon » Mon Nov 27, 2017 10:35 pm

I think he is referring to a command to open a system explorer/finder window...

@Figgy78
You should try OpenURL() command with the path that you want to explore

For example on Windows:
Code: Select all
OpenURL("C:\")
User avatar
Allanon
 
Posts: 430
Joined: Sun Feb 14, 2010 8:53 pm
Location: Italy

Re: Open up a Finder/Explorer window

Postby Figgy78 » Wed Nov 29, 2017 10:47 am

You should try OpenURL() command with the path that you want to explore


Exactly what I was looking for. Works like a dream.

I actually found this command but didn't bother to test it as I assosiate URL's with the Internet. I was schooled.
Figgy78
 
Posts: 30
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Postby Figgy78 » Wed Nov 29, 2017 1:17 pm

Follow up question:

This works fine in Windows, but I compiled it for MacOS and tried it, and it doesn't seem to work with Finder?
Figgy78
 
Posts: 30
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Postby Krzysztof » Thu Nov 30, 2017 10:05 am

Hi,

On Mac you have to add file:// prefix, following works for me:

Code: Select all
OpenURL("file:///Users/")


Is there a way to get the path to $HOME in Hollywood?
Krzysztof
 
Posts: 2
Joined: Fri Nov 10, 2017 11:11 am

Re: Open up a Finder/Explorer window

Postby Figgy78 » Thu Nov 30, 2017 10:13 am

Krzysztof wrote:...On Mac you have to add file:// prefix...

Ah.. That's right! Thanks!
Figgy78
 
Posts: 30
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Postby airsoftsoftwair » Thu Nov 30, 2017 11:12 pm

Krzysztof wrote:Is there a way to get the path to $HOME in Hollywood?


Check out GetSystemInfo().
User avatar
airsoftsoftwair
 
Posts: 2337
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany

Re: Open up a Finder/Explorer window

Postby Krzysztof » Fri Dec 01, 2017 1:11 am

Thanks!
Krzysztof
 
Posts: 2
Joined: Fri Nov 10, 2017 11:11 am

Re: Open up a Finder/Explorer window

Postby Figgy78 » Fri Dec 01, 2017 1:22 pm

airsoftsoftwair wrote:
Krzysztof wrote:Is there a way to get the path to $HOME in Hollywood?


Check out GetSystemInfo().

Combined with GetVersion() this is a rocking combination :)

Cheers!
Figgy78
 
Posts: 30
Joined: Wed Oct 11, 2017 9:13 am


Return to General programming

Who is online

Users browsing this forum: No registered users and 3 guests