Open up a Finder/Explorer window

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

Open up a Finder/Explorer window

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

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

Re: Open up a Finder/Explorer window

Post by PEB » Mon Nov 27, 2017 8:09 pm


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

Re: Open up a Finder/Explorer window

Post by 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:\")
----------------------------
[Allanon] Fabio Falcucci
AMC - Creative Development // Docs Site // Support Forum
Support me on Patreon for Hollywood libraries!

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

Re: Open up a Finder/Explorer window

Post by 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

Post by 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?

Krzysztof
Posts: 3
Joined: Fri Nov 10, 2017 11:11 am

Re: Open up a Finder/Explorer window

Post by 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?

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

Re: Open up a Finder/Explorer window

Post by Figgy78 » Thu Nov 30, 2017 10:13 am

Krzysztof wrote:...On Mac you have to add file:// prefix...
Ah.. That's right! Thanks!

User avatar
airsoftsoftwair
Posts: 2484
Joined: Fri Feb 12, 2010 3:33 pm
Location: Germany
Contact:

Re: Open up a Finder/Explorer window

Post by 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().

Krzysztof
Posts: 3
Joined: Fri Nov 10, 2017 11:11 am

Re: Open up a Finder/Explorer window

Post by Krzysztof » Fri Dec 01, 2017 1:11 am

Thanks!

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

Re: Open up a Finder/Explorer window

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

Post Reply