Target Folder for Shortcut

Choose Target Folder for Shortcut

I'm building a Button wich opens a Folder as Popup.
(Like the Quicklaunch Folders in Windows)
The Problem is that the User should be able to choose
the Folder.
How can I do this?
Can I Make it with a Right Click Menu?


I got this Code from this Forum to make a Right Click Menu:

Function Object_OnRButtonUp(x,y,dragged)
If Not dragged Then
Dim menu
Set menu = DesktopX.CreatePopupMenu
menu.AppendMenu 0, 1, "Choose Folder"
menu.AppendMenu 0, 2, "Options 2"
menu.AppendMenu 0, 99, "DesktopX"
Dim rtn
rtn = menu.TrackPopupMenu(0, System.CursorX, System.CursorY)
Select Case rtn
Case 1

Wich Code do I have to place here
that the user can Choose a Folder.
The choosen Folder must be saved
in the INI or the Preferences.


Case 2
'Do something else
End Select
Set menu = nothing
If rtn <> 99 Then
Object_OnRButtonUp=True
End If
End If
End Function
4,634 views 3 replies
Reply #2 Top
You should look at the DX Scripting documentation for System.FolderDialog. Link

Also look at the new Object.Command and Object.CommandParameters properties.
Reply #3 Top
Do you need to populate the menu with the content of a folder? You can use the FileSystemObject, http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/jsobjFileSystem.asp