AutoHotkey Community

It is currently May 24th, 2012, 8:48 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 149 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next
Author Message
 Post subject: [module] MMenu 1.0 b1
PostPosted: March 21st, 2007, 9:23 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.




Image



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 :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:
http://www.autohotkey.com/forum/viewtop ... 194#353194

_________________
Image


Last edited by majkinetor on December 17th, 2010, 8:29 am, edited 10 times in total.

Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2007, 9:57 pm 
Offline

Joined: February 14th, 2005, 4:05 pm
Posts: 4710
Location: Boulder, CO
Beautiful!

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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2007, 10:39 pm 
Great stuff!

I like your modular approach too. 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2007, 11:06 pm 
:shock: Wow ! 8)


Report this post
Top
  
Reply with quote  
 Post subject:
PostPosted: March 21st, 2007, 11:10 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Thanks guys. :D

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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 22nd, 2007, 2:14 am 
Offline

Joined: October 1st, 2005, 9:55 pm
Posts: 772
Location: Texas, USA
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! :)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 24th, 2007, 5:08 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
I made documentation online. Check out the first post or click here

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2007, 12:55 pm 
Offline

Joined: June 26th, 2006, 6:14 pm
Posts: 1379
Location: USA
Test script work in Vista too.!


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 25th, 2007, 1:06 pm 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2007, 9:55 pm 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2007, 10:23 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2007, 10:40 pm 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
thanks for the specifications, but for now the enthusiasm is for alttab replacement. If you want to see it, check http://www.autohotkey.com/forum/viewtopic.php?p=112744#112744 and let me know

_________________
____________________
______________________
kiu - www.romeosa.com


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 26th, 2007, 10:45 pm 
Offline

Joined: December 18th, 2005, 5:40 pm
Posts: 234
Location: Italy - Galatro(RC)
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


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 27th, 2007, 6:05 am 
Offline

Joined: December 27th, 2005, 1:46 pm
Posts: 6837
Location: France (near Paris)
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.

_________________
Image vPhiLho := RegExReplace("Philippe Lhoste", "^(\w{3})\w*\s+\b(\w{3})\w*$", "$1$2")


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: March 27th, 2007, 10:54 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
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

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 149 posts ]  Go to page 1, 2, 3, 4, 5 ... 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: lblb, Yahoo [Bot] and 18 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group