Open up a Finder/Explorer window

Discuss any general programming issues here
Post Reply
Figgy78
Posts: 32
Joined: Wed Oct 11, 2017 9:13 am

Open up a Finder/Explorer window

Post by Figgy78 »

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!
PEB
Posts: 567
Joined: Sun Feb 21, 2010 1:28 am

Re: Open up a Finder/Explorer window

Post by PEB »

User avatar
Allanon
Posts: 732
Joined: Sun Feb 14, 2010 7:53 pm
Location: Italy
Contact:

Re: Open up a Finder/Explorer window

Post by Allanon »

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:\")
Figgy78
Posts: 32
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Post by Figgy78 »

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: 32
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Post by Figgy78 »

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?
Krzysztof
Posts: 5
Joined: Fri Nov 10, 2017 10:11 am

Re: Open up a Finder/Explorer window

Post by Krzysztof »

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?
Figgy78
Posts: 32
Joined: Wed Oct 11, 2017 9:13 am

Re: Open up a Finder/Explorer window

Post by Figgy78 »

Krzysztof wrote:...On Mac you have to add file:// prefix...
Ah.. That's right! Thanks!
User avatar
airsoftsoftwair
Posts: 5433
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: Open up a Finder/Explorer window

Post by airsoftsoftwair »

Krzysztof wrote:Is there a way to get the path to $HOME in Hollywood?
Check out GetSystemInfo().
Krzysztof
Posts: 5
Joined: Fri Nov 10, 2017 10:11 am

Re: Open up a Finder/Explorer window

Post by Krzysztof »

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

Re: Open up a Finder/Explorer window

Post by Figgy78 »

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!
Post Reply