Default folder when using selectFolder()?

I am new to the selectFolder() game but am loving it!

I read in the documentation that there are a few arguments (correct word?) that allow for other options when using this function.

I would like to ideally provided a default folder so the user does not have to do as much navigation. In the docs it says:

selectFolder(prompt, callbackMethod, defaultSelection, callbackObject, parentFrame)

Is “defaultSelection” what I think it is such that I can enter the filePath and it will default to that when prompted? My only problem is what do I put for callbackMethod, callbackObject, parentFrame, etc?

Thank you for any tips!

You can take a look below to know which datatype each selectFolder()'s parameter is:

For example, parameter defaultSelection is of datatype File.


Thank you for listing the documentation however that’s the part I don’t understand. It’s like having the dictionary, knowing how to sound out the word, yet not knowing how it’s spelt which makes looking it up in the dictionary harder.

So, for “callbackMethod” what do I put?

For “callbackObject” what do I put?

For “parentFrame” what do I put?

For “file” what do I put?

In most of the processing documentation it gives examples. But not here. I tried a bunch of first guesses but they just ended in errors and tears.

Sorry to be such a newb but I don’t see it listed elsewhere and I feel like a group of monkeys trying to approximate “To be or not to be” until the end of time as I have no idea where to even start.

Can I at least get some clues?

Once again I only want the open folder dialogue to start at a certain path. That’s it.

Thank you!


I don’t think he is REALLY using the folder you tell it to use…

It looks like he does, but in fact he just uses the last folder…

I think it’s a bit buggy… imho

1 Like