AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

directories in Menu

 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List
View previous topic :: View next topic  
Author Message
savage



Joined: 02 Jul 2004
Posts: 206

PostPosted: Tue Jul 06, 2004 5:02 pm    Post subject: directories in Menu Reply with quote

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
View user's profile Send private message AIM Address
Chris
Site Admin


Joined: 02 Mar 2004
Posts: 10467

PostPosted: Tue Jul 06, 2004 11:25 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Wed Jul 07, 2004 12:27 am    Post subject: Reply with quote

i've posted a script in scripts section that does folders and when folder is clicked the subfolder is displayed in menu.

http://www.autohotkey.com/forum/viewtopic.php?t=299
_________________
Back to top
View user's profile Send private message
savage



Joined: 02 Jul 2004
Posts: 206

PostPosted: Wed Jul 07, 2004 10:55 pm    Post subject: Reply with quote

Thanks, those ought to do the trick!
Back to top
View user's profile Send private message AIM Address
Rajat



Joined: 28 Mar 2004
Posts: 1717

PostPosted: Thu Jul 08, 2004 1:15 am    Post subject: Reply with quote

using a different approach than submenus, i've (i think) achieved what's needed using menu cmd.

http://www.autohotkey.com/forum/viewtopic.php?t=459
_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Wish List All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group