 |
AutoHotkey Community Let's help each other out
|
| View previous topic :: View next topic |
| Author |
Message |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Wed Mar 21, 2007 9:23 pm Post subject: [module] MMenu 1.0 b1 |
|
|
MMenu 1.0 b1
Download Documentation
MMenu is the replacement for the standard AutoHotKey Menu command. Among other options, it alows menu items to have icons, and solves limitation of standard menus about item identification – besides title, which is nonreliable way to identify items, MMenu gives you an option to identify menu items by ID or position. Mmenu gives you full control over the menu you created, even while it is displayed.
To use this extension simply include MMenu.ahk in your script via #include directive.
First check out _MMenuTest.ahk. Then take a look at documentation to get familar with the syntax. For now, include mmenu the way it is included in _MMenuTest.
How to use: copy includes folder where your script is and put this at the end of your script
| Code: | #include includes
#include MMenu.ahk
#include structs.ahk |
Some nice screenshots: white, black, for kids.
Have fun
NOTE: If you don't see icons, desable WindowBlinds or exclude AutoHotKey from skinning in its options.
NOTE2: For now all very dynamic MMenu usages (like script that creates and deletes over 100 menus in an hour) should reload the script once in while (every few hours, depending on script usage), otherwise, on each menu/item creation MMenu's Destroy function will get slower and Select event for menus that have submenus. If you don't use this functions, its OK. _________________

Last edited by majkinetor on Fri Aug 03, 2007 1:07 pm; edited 8 times in total |
|
| Back to top |
|
 |
Laszlo
Joined: 14 Feb 2005 Posts: 4512 Location: Boulder, CO
|
Posted: Wed Mar 21, 2007 9:57 pm Post subject: |
|
|
Beautiful!
(There is a little problem with the ToolTip in the demo: it does not get cleared, new info is added to the bottom.) |
|
| Back to top |
|
 |
n-l-i-d Guest
|
Posted: Wed Mar 21, 2007 10:39 pm Post subject: |
|
|
Great stuff!
I like your modular approach too.  |
|
| Back to top |
|
 |
BoBo Guest
|
Posted: Wed Mar 21, 2007 11:06 pm Post subject: |
|
|
Wow !  |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Wed Mar 21, 2007 11:10 pm Post subject: |
|
|
Thanks guys.
| Laszlo wrote: | | There is a little problem with the ToolTip in the demo: it does not get cleared, new info is added to the bottom. |
The tooltip should be cleared after 500 characthers. New info is added to the bottom intentionly so to see history of events. _________________
 |
|
| Back to top |
|
 |
jballi
Joined: 01 Oct 2005 Posts: 537 Location: Texas, USA
|
Posted: Thu Mar 22, 2007 2:14 am Post subject: |
|
|
Those 13x13 menu icons are very hard to see/find/create/etc. so I definitely see myself using this in the future. Thanks for sharing!  |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Sat Mar 24, 2007 5:08 pm Post subject: |
|
|
I made documentation online. Check out the first post or click here _________________
 |
|
| Back to top |
|
 |
ahklerner
Joined: 26 Jun 2006 Posts: 1317 Location: USA
|
Posted: Sun Mar 25, 2007 12:55 pm Post subject: |
|
|
| Test script work in Vista too.! |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6723 Location: France (near Paris)
|
Posted: Sun Mar 25, 2007 1:06 pm Post subject: |
|
|
Um, the animated Gif in this topic is nice but the demo is a bit too much in the size of the images... The screenshots are more balanced.
This sure will answer many requests.
Good layout if the note/manual page too, clean and clear. Some typos remain, perhaps check it with some spellchecker. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
kiu
Joined: 18 Dec 2005 Posts: 230 Location: Italy - Galatro(RC)
|
Posted: Mon Mar 26, 2007 9:55 pm Post subject: |
|
|
I'm impressed with the possibilities of this API. I like menus and as I seen this post I made a script to improve my alttab script. I will publish it as soon as I will test it a little bit. I think that I will extend my clipboard script and fast folder browser with this API. So, thank you majkinetor _________________ ____________________
______________________
kiu |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Mon Mar 26, 2007 10:23 pm Post subject: |
|
|
The API will be upgraded with Getter functions to support better dynamic menu creation. I left this for the end along with removal of some variables that are not needed and that I left now for debuging and maintaining reason.
Keep in mind that currently, using the title as an item identifier is slowest of all 3 identification methods. Position and ID will instantly get you the menu item while if you reference it by title, entire menu will be traversed until this item is found (first one with that title). This is almost instant for normal menus, but you may create menu that have 1000 or more items, or instance, the one holding System32 folder.
I didn't mention that MMenu is already well tested. It is currently used by at least 20 or more ppl testing alpha release of Favmenu 3 script, the one that you can see above in the colored menu screenshots. I am aware kiu that your "fast folder browser" is someting similar to Favmenu3 at least when OpenSave dialogs are in question. Check Favmenu3 alpha to see if you should save your working entusiams for something else (but I guess you are too attached now ). FM3 works in all places that you can set or get folder. You can check out animated gifs here, and the latest alpha here.
2PhiLho
Thx for report, I did spellchecker on documentation, and will update it on next release. For your "size" problem, I don't think that ~200KB is big and this is beta release. Final will be 1 file - MMenu.ahk.
2all
If you have any suggestions to API its good to say it now until I close it for eternity. _________________
 |
|
| Back to top |
|
 |
kiu
Joined: 18 Dec 2005 Posts: 230 Location: Italy - Galatro(RC)
|
|
| Back to top |
|
 |
kiu
Joined: 18 Dec 2005 Posts: 230 Location: Italy - Galatro(RC)
|
Posted: Mon Mar 26, 2007 10:45 pm Post subject: |
|
|
also note that the main purpose of "fast folder browser" is to browse folders quickly, so the purpose is different from your FavMenu  _________________ ____________________
______________________
kiu |
|
| Back to top |
|
 |
PhiLho
Joined: 27 Dec 2005 Posts: 6723 Location: France (near Paris)
|
Posted: Tue Mar 27, 2007 6:05 am Post subject: |
|
|
| majkinetor wrote: | | For your "size" problem, I don't think that ~200KB is big and this is beta release. Final will be 1 file - MMenu.ahk. | No, I meant that the images in the sub-menus are really big (pixel-wise) for my taste, but I understand that's for demo, and it can even have it usefulness. _________________
vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2") |
|
| Back to top |
|
 |
majkinetor
Joined: 24 May 2006 Posts: 4114 Location: Belgrade
|
Posted: Tue Mar 27, 2007 10:54 am Post subject: |
|
|
AH, I missunderstood you.
I didnt want to prevent any kind of usage, good software should provoide possibilities, not restrictions. So you can put anything as a icon size parameter of the menu, from 8 - 888 . I already seen some ppl using horizontal menu with large icons to simulate windows menu with icons
The code goes something like this and with some tweaking you can show submenus bellow, not aside:
| Code: | main := MMenu_Create("S64 O5")
s1 := MMenu_Create("")
s2 := MMenu_Create("")
MMenu_Add( main, "Configuration", "icons\gear.ico", 0, "b d M" s1)
MMenu_Add( main, "Time", "icons\home.ico", 0, "b d M" s2)
MMenu_Add( main, "Chat room", "icons\chat.ico", 0, "b d M" s1 )
MMenu_Add( main, "Exit","icons\pen_red.ico" ,0, "b d M" s2 )
MMenu_Add( s1, "Configuration")
MMenu_Add( s1, "Time")
MMenu_Add( s1, "Configuration")
MMenu_Add( s1, "Time")
MMenu_Add( s1, "Configuration")
MMenu_Add( s1, "Time")
MMenu_Add( s1, "Configuration")
MMenu_Add( s1, "Time")
MMenu_Add( s1, "Configuration")
MMenu_Add( s1, "Time")
MMenu_Add( s1, "Configuration")
MMenu_Add( s1, "Time")
MMenu_Add( s2, "Chat room")
MMenu_Add( s2, "Exit")
MMenu_Add( s2, "Chat room")
MMenu_Add( s2, "Exit")
MMenu_Show(main, 100, 100, "OnClick")
return
OnClick:
return |
_________________
 |
|
| Back to top |
|
 |
|
|
You can post new topics in this forum You can reply to topics in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|