| View previous topic :: View next topic |
| Author |
Message |
savage
Joined: 02 Jul 2004 Posts: 206
|
Posted: Tue Jul 06, 2004 5:02 pm Post subject: directories in Menu |
|
|
It would be great if we could add the contents of a directory to a Menu, like so:
Menu, Documents, Add, C:\docume~1\blahblah\mydocu~1
It would especially be nice if it were possible to do this with system folders like the control panel.
Proper rightclick context menus on those items would be nice, but would probably be pretty hard to implement. I'll look for the source code for the popup2 module for litestep, that would probably help you a lot with this.
EDIT: Found it - http://www.shellfront.org/modules/source/popup2-2.1.7-src.zip |
|
| Back to top |
|
 |
Chris Site Admin
Joined: 02 Mar 2004 Posts: 10467
|
Posted: Tue Jul 06, 2004 11:25 pm Post subject: |
|
|
This is actually easier to do than I thought. Here is a working script that does directories rather than files:
| Code: | #Persistent
Menu, tray, add ; separator
Loop, C:\*.*, 2
Menu, tray, add, %A_LoopFileName%, SelectFolder
return
SelectFolder:
MsgBox You selected folder %A_ThisMenuItem% from the menu.
return |
You could easily change the above to do files instead of directories. Having submenus for the contents of folders would probably be more difficult since the submenus must exist before attaching them to the parent menu, not to mention that there can be many levels of depth to folders so you might wind up with a menu that is very wide, tall, or both.
| Quote: | | It would especially be nice if it were possible to do this with system folders like the control panel. |
I've put it on the list to check it out sometime. In the meantime, you could add your favorite control panel items manually by using the RunDLL32 method I mentioned in the other topic. |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
|
| Back to top |
|
 |
savage
Joined: 02 Jul 2004 Posts: 206
|
Posted: Wed Jul 07, 2004 10:55 pm Post subject: |
|
|
| Thanks, those ought to do the trick! |
|
| Back to top |
|
 |
Rajat
Joined: 28 Mar 2004 Posts: 1717
|
|
| Back to top |
|
 |
|