| View previous topic :: View next topic |
| Author |
Message |
snakebyte Gold Member


Joined: 07 May 2003 Posts: 379 Location: Seattle
|
Posted: Tue Feb 20, 2007 5:00 am Post subject: Xplorer2Hack: Menu++ Customizable menu for Xplorer2 |
|
|
A favorite of folks who want to customize the menus in xplorer².
This topic thread was originally posted in the xplorer² Professional forum. Moved here 19-May-2010 =fg=
===============================================================================
Guys, I wrote this tool over the weekend and wanted to share it with you. Menu++ extends Xplorer2 with customizable user menus. It is similar to MenuHack. Apart from command ids, Menu++ supports other command invocation methods like sending direct keystrokes to xplorer2
With Menu++ you can
- Group your favorite and frequently used commands together.
- Make deeply nested menu commands more accessible.
- Combine multiple xplorer2 actions as a single menu command.
- Convert xplorer2 “hotkey only” commands into menu commands. No need to remember those cryptic hotkeys.
- Use it as a cheat sheet to list xplorer2 hotkeys.
- Launch any external application or a script.
- Open bookmark folders in new tab
- Using a Laptop? You can now use those Num pad hotkeys you always missed.
Menu++ is config based tool and it can be launched as a user command from Xplorer2.
Whats more? You can have multiple instances of customizable menus by passing different config files to Menu++.exe as multiple user commands.
Take it for a spin and let me know what you think.
http://hacks.anunay.com/xplorer2/downloads/MenuPlusPlus.zip
Installation
1. Unzip Menu++.exe, config.ini and display.ini to any folder of your choice. (say C:\My Downloads\Menu++)
2. Create two user commands in Xplorer2 as
| Code: | Name: Menu1
Description: >"C:\My Downloads\Menu++\Menu++.exe" config.ini $S
Name: Menu2
Description: >"C:\My Downloads\Menu++\Menu++.exe" display.ini $S |
Note: Don't skip ">" symbol at the start of your description.
3. Add these two commands to your toolbar (Right click on your toolbar and choose customize. Add "Menu1" and "Menu2" commands that you created earlier from left list box to the right one).
4. Now you can use these two toolbar buttons to launch your custom menus. Use the 'Configure...' menu item at the end, to edit the configuration file associated with that particular instance of Menu++.
The included readme file has the config file syntax details. I have tried to use different action types in config.ini and display.ini for your reference. Use these files as starting point for your own customizable menus.
Good Luck.
[ A favorite topic: moved from x² Pro forum -fg- ] _________________ Help! I'm an AI running around in someone's universe simulator.
Last edited by snakebyte on Thu Jun 19, 2008 5:26 pm; edited 3 times in total |
|
| Back to top |
|
 |
Demetris Silver Member

Joined: 04 Jul 2004 Posts: 220
|
Posted: Tue Feb 20, 2007 6:42 am Post subject: |
|
|
Very good idea, useful, and easy to set up!
I think it would be very good if x2 included something like this by default, as well as something like Wasker’s config editor.
I’m curious: what is it made with? |
|
| Back to top |
|
 |
nikos Moderator


Joined: 07 Feb 2002 Posts: 12346 Location: UK
|
Posted: Tue Feb 20, 2007 7:53 am Post subject: |
|
|
that's impressive snakebyte, you nearly wrote your own file manager there from scratch
clearly you'll like the "pick custom icon for toolbar command" feature when it is introduced! |
|
| Back to top |
|
 |
FrizzleFry Gold Member


Joined: 16 Oct 2005 Posts: 454
|
Posted: Tue Feb 20, 2007 12:11 pm Post subject: |
|
|
This is very cool. I have already set up a couple of menus to reduce the number of user commands and toolbar buttons I had setup.
Edit: Is there a way to access or send x2's batch tokens to the menu commands? I have a few user commands that run in the current folder but use $I access the inactive pane's folder. Or use the currently selected file(s) as parameters.
If not, then I would suggest adding the ability to pass extra parameters to Menu++ that could be used by the commands in the menu. Similar to batch file parameters. |
|
| Back to top |
|
 |
snakebyte Gold Member


Joined: 07 May 2003 Posts: 379 Location: Seattle
|
Posted: Tue Feb 20, 2007 3:21 pm Post subject: |
|
|
| Demetris wrote: | | I’m curious: what is it made with? |
I have written Menu++ using Autohotkey. I got this idea around 7 months back and I tried implementing it using MFC, C# and autoit3. I didn't want a memory resident application always running in system tray. My code was getting complicated as it was difficult to implement menu without main window body.
Recently I was reading Autohotkey help and I found that autohotkey has this ability to run blocks of code automatically in a new thread without having to do anything. Also it has very easy API to create Menus. This greatly simplified my implementation of Menu++. I also took advantage of WinMenuSelectItem, Send and Run APIs to create different actions types for Menu++
Being a programmer, I don't like the non-standard syntax style of Autohotkey, but I must agree that it packs lot of punch. You can achieve a lot by writing very few lines of code. Menu++ has hardly 150 lines of code, 60% of which is just config file parsing code.
| nikos wrote: | | clearly you'll like the "pick custom icon for toolbar command" feature when it is introduced! |
Nikos, if my xplorer2 screenshot makes you implement custom icons any sooner, then all the effort that I have put in Menu++ has been already paid off .
| FrizzleFry wrote: | Is there a way to access or send x2's batch tokens to the menu commands? I have a few user commands that run in the current folder but use $I access the inactive pane's folder. Or use the currently selected file(s) as parameters.
If not, then I would suggest adding the ability to pass extra parameters to Menu++ that could be used by the commands in the menu. Similar to batch file parameters. |
While writing Menu++, I thought over this feature. Implementing x2's tokens in Menu++ would be like re-inventing the wheel. However, there is a very simple workaround for this. Create a user command that uses the x2's batch tokens. Don't add this user command to x2 toolbar, but add it to Menu++ config file instead. See the example below
| Code: |
Title='My User Command'
Action=Menu,10&,3&,[POSITION_OF_YOUR_USER_COMMAND]&
|
_________________ Help! I'm an AI running around in someone's universe simulator.
Last edited by snakebyte on Tue Feb 20, 2007 8:11 pm; edited 1 time in total |
|
| Back to top |
|
 |
FrizzleFry Gold Member


Joined: 16 Oct 2005 Posts: 454
|
Posted: Tue Feb 20, 2007 7:31 pm Post subject: |
|
|
| snakebyte wrote: | | While writing Menu++, I thought over this feature. Implementing x2's tokens in Menu++ would be like re-inventing the wheel. However, there is a very simple workaround for this. Create a user command that uses the x2's batch tokens. Don't add this user command to x2 toolbar, but add it to Menu++ config file instead. |
I guess I see your point. I'll try your workaround.
I did run into a small problem: Menu++ will not correctly run commands which include the comma character. I assume this is because the comma is used as a delimiter. Enclosing the command in quotes did not help. |
|
| Back to top |
|
 |
fgagnon Site Admin


Joined: 08 Sep 2003 Posts: 4271 Location: Springfield
|
Posted: Tue Feb 20, 2007 7:57 pm Post subject: |
|
|
| Don't know it it would work, but did you try the double comma trick (,,) to 'escape' it as a delimiter? |
|
| Back to top |
|
 |
snakebyte Gold Member


Joined: 07 May 2003 Posts: 379 Location: Seattle
|
Posted: Tue Feb 20, 2007 8:00 pm Post subject: |
|
|
| FrizzleFry wrote: |
I did run into a small problem: Menu++ will not correctly run commands which include the comma character. I assume this is because the comma is used as a delimiter. Enclosing the command in quotes did not help. |
Yeah I'm aware of this issue. Try passing ascii value or virtual key code for comma character.
{ASC nnnnn} or {vkXX}{scYYY}{vkXXscYYY}.
See Autohotkey send command for details. http://www.autohotkey.com/docs/commands/Send.htm
Let me know if you can get this to work, otherwise I'll implement a workaround for comma character.
Edit: Try "{ASC 44}" (Without quotes) instead of comma. _________________ Help! I'm an AI running around in someone's universe simulator. |
|
| Back to top |
|
 |
vserghi Gold Member


Joined: 19 Mar 2002 Posts: 678 Location: UK
|
Posted: Wed Feb 21, 2007 5:44 am Post subject: |
|
|
Wow, well done. This is quite powerful.
I have used AutohotKey before for minor things, but this is pretty cool. Big pat on the back. _________________ Vas |
|
| Back to top |
|
 |
Demetris Silver Member

Joined: 04 Jul 2004 Posts: 220
|
Posted: Wed Feb 21, 2007 7:35 am Post subject: |
|
|
| snakebyte wrote: | | Demetris wrote: | | I’m curious: what is it made with? |
I have written Menu++ using Autohotkey. I got this idea around 7 months back and I tried implementing it using MFC, C# and autoit3. I didn't want a memory resident application always running in system tray. My code was getting complicated as it was difficult to implement menu without main window body.
Recently I was reading Autohotkey help and I found that autohotkey has this ability to run blocks of code automatically in a new thread without having to do anything. Also it has very easy API to create Menus. This greatly simplified my implementation of Menu++. I also took advantage of WinMenuSelectItem, Send and Run APIs to create different actions types for Menu++
Being a programmer, I don't like the non-standard syntax style of Autohotkey, but I must agree that it packs lot of punch. You can achieve a lot by writing very few lines of code. Menu++ has hardly 150 lines of code, 60% of which is just config file parsing code. |
Thanks for the answer!
I thought it maybe was AutoHotkey, but I just didn’t know that something like this can be made with AHK. Really neat! |
|
| Back to top |
|
 |
longfellow Bronze Member

Joined: 16 Jun 2004 Posts: 152
|
Posted: Thu Feb 22, 2007 11:16 am Post subject: |
|
|
Very nice, indeed! Simple to use, yet powerful. Impressive use of AHK; I had no idea one could do something like this without having an AHK script loaded.
Thanks for sharing this great tool! |
|
| Back to top |
|
 |
Mr.Pleasant Silver Member

Joined: 29 Dec 2006 Posts: 242 Location: Utrecht, NL
|
Posted: Thu Feb 22, 2007 6:05 pm Post subject: |
|
|
I think I'll like this one! Thanks, Snakebyte! Very nice you're sharing it with us  |
|
| Back to top |
|
 |
Stacey23 Member

Joined: 21 Jul 2006 Posts: 28
|
Posted: Sun May 06, 2007 5:02 am Post subject: |
|
|
HI snakebyte, great great tool.
This suggestion works well too
| Quote: | Title='My User Command'
Action=Menu,10&,3&,[POSITION_OF_YOUR_USER_COMMAND]& |
hmm just a suggestion, maybe posts like these can be made sticky so members who dont get to check on the boards often get to see tools such as these right away.
thanks again snakebyte. |
|
| Back to top |
|
 |
nikos Moderator


Joined: 07 Feb 2002 Posts: 12346 Location: UK
|
Posted: Sun May 06, 2007 4:40 pm Post subject: |
|
|
| i think this is mentioned in the manual, nie? |
|
| Back to top |
|
 |
snakebyte Gold Member


Joined: 07 May 2003 Posts: 379 Location: Seattle
|
Posted: Sun May 06, 2007 9:52 pm Post subject: |
|
|
I think Menuhack is mentioned indirectly as Autoit3 script but Menu++ is not there. _________________ Help! I'm an AI running around in someone's universe simulator. |
|
| Back to top |
|
 |
|