Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[module] MMenu 1.0 b1


  • Please log in to reply
126 replies to this topic
majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
MMenu 1.0 b1

        Download   

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.




Posted Image



How to use: copy includes folder where your script is and put this at the end of your script

#include includes
#include MMenu.ahk
#include structs.ahk

Some nice screenshots: white, black, for kids.

Have fun :p

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.


Icon resizing fix:
<!-- m -->http://www.autohotke... ... 194#353194<!-- m -->
Posted Image

Laszlo
  • Moderators
  • 4713 posts
  • Last active: Mar 31 2012 03:17 AM
  • Joined: 14 Feb 2005
Beautiful!

(There is a little problem with the ToolTip in the demo: it does not get cleared, new info is added to the bottom.)

n-l-i-d
  • Guests
  • Last active:
  • Joined: --
Great stuff!

I like your modular approach too. 8)

BoBo
  • Guests
  • Last active:
  • Joined: --
:shock: Wow ! 8)

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
Thanks guys. :D

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.
Posted Image

jballi
  • Members
  • 1029 posts
  • Last active:
  • Joined: 01 Oct 2005
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! :)

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
I made documentation online. Check out the first post or click here
Posted Image

ahklerner
  • Members
  • 1386 posts
  • Last active: Oct 08 2014 10:29 AM
  • Joined: 26 Jun 2006
Test script work in Vista too.!

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005
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.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

kiu
  • Members
  • 234 posts
  • Last active: Oct 10 2010 07:30 PM
  • Joined: 18 Dec 2005
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 - www.romeosa.com

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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.
Posted Image

kiu
  • Members
  • 234 posts
  • Last active: Oct 10 2010 07:30 PM
  • Joined: 18 Dec 2005
thanks for the specifications, but for now the enthusiasm is for alttab replacement. If you want to see it, check http://www.autohotke...p=112744#112744 and let me know
____________________
______________________
kiu - www.romeosa.com

kiu
  • Members
  • 234 posts
  • Last active: Oct 10 2010 07:30 PM
  • Joined: 18 Dec 2005
also note that the main purpose of "fast folder browser" is to browse folders quickly, so the purpose is different from your FavMenu :wink:
____________________
______________________
kiu - www.romeosa.com

PhiLho
  • Moderators
  • 6850 posts
  • Last active: Jan 02 2012 10:09 PM
  • Joined: 27 Dec 2005

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.
Posted Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
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:

main := MMenu_Create("S64 O5")

	s1 := MMenu_Create("")
	s2 := MMenu_Create("")

	MMenu_Add( main, "Configuration", "icons\gear.ico", 0, "[color=orange]b[/color] d M" s1)
	MMenu_Add( main, "Time", "icons\home.ico", 0, "[color=orange]b[/color] 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

Posted Image