How do I do this?

I need a code/script to be able to open a folder when a button is clicked. BTW i am on mac.

i do not see folder items

You will need to use folderitems. Maybe check out the introductory books here first?

does anyone just have the script that i have to type to make it open the folder

To select a folder do this:

Dim f as FolderItem = SelectFolder()

To select a file within the folder:

Dim f as Folderitem = GetOpenFolderItem("") //Passing in the filetype if you want to filter

Im sorry Greg but it is not opening my folders just giving me the option to open a folder

You haven’t specifically said what you need to do. For tips on file/folder access, take a look at the examples in the Files folder included with Xojo. Also review the Files chapter in Xojo User Guide Book 3: Framework.

Just a thought, but this may not be the best way to introduce yourself to the forums.

Please define “make it open the folder.” Do you mean construct a folderitem object that you can use within your program? Or do you mean open a Finder window containing a specific folder? Or what?

Please be as specific as possible. We seem to be having trouble understanding your desired result.

I bet he wants to have the folder open in the Finder (or whatever).

FolderItem.Launch will do this if FolderItem is a directory. If FolderItem is a file, Launch will open it in an application (as though you had double-clicked it in the Finder-or-whatever).

And PLEASE give your question a more descriptive header than “How do I do this”. Why not “How do I open a folder”?