AutoHotkey Community

It is currently May 25th, 2012, 7:27 pm

All times are UTC [ DST ]




Post new topic Reply to topic  [ 149 posts ]  Go to page Previous  1, 2, 3, 4, 5, 6, 7 ... 10  Next
Author Message
 Post subject:
PostPosted: June 3rd, 2007, 10:17 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
majkinetor wrote:
One thing will be there for shure. Item ID is unique across all menus, so I will drop menu parameter for it (that is, it will be dummy). This way to remove an item from the menu you will just have to know its ID, not its menu handle.
Don't understand, but guess I do not have to.
Maybe a new cleaned up MMenu modul could have a new interface. I would put the Options right after the Title, since I use it more frequently then icon or position. Just a thought.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 3rd, 2007, 10:32 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Perhaps.

I will consult you when the time comes to update MMenu.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 3rd, 2007, 12:54 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
2 toralf

Is this what you want ?

Code:
MMenu_RemoveAll( pMenu ) {
   loop, % MMenu_Count(pMenu)
      MMenu_Remove(pMenu, 1)
   
   return (MMenu_Count(pMenu)=0)
}


Just add it in MMenu.ahk and use it.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 3rd, 2007, 2:55 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Thanks a lot I didn't know about MMenu_Count(). It wasn't in the doc. But now I see it is documented in the file header. Thanks again.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 3rd, 2007, 3:16 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Word doc is outdated. Use html reference.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 3rd, 2007, 3:28 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
don't have the html.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 3rd, 2007, 3:30 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Thanks got it now. Added it to LilBuilder repo

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2007, 11:16 am 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
Quote:
If you set the ID to the already existing, you will remove ID of the item previously associated with it. Item ID is unique acros all menus that you create.
Could this be changed? I would like it to be unique for its menu. This will help for LilBuilder. Specially for the common menu parts. Currently I use numbers, but that is not very robust, since order might change or items might be left out for some controls.

In my imagination: internally extend the item ID with the menu number. If this is done through the whole mmemu module, the item id becomes unique per menu.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2007, 12:05 pm 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Well, there are bigger benefits of globaly unique ID then otherwise.
With global ID, you don't have to care about which menu contains item, and U can always set it or remove it (well, now it requires menu id, but in next update I planned to make this param optional). So if you once added ID=myId in some menu, you can set/remove it without knowing which menu was it.

Quote:
Currently I use numbers, but that is not very robust, since order might change or items might be left out for some controls.

You can always put ID in such way to be connected to the menu. Lets say you have menu named common. You can specify ID's to be Common_N. Without N, u have no mean to know if particular ID exist (this will change once AHK have asoc arrays).

I don't know what kind of problems you might have with ID that are not solvable in robust way with current API. Can you provide sample that is problematic for you ?

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: June 15th, 2007, 3:14 pm 
Offline

Joined: January 31st, 2005, 9:50 am
Posts: 3910
Location: Bremen, Germany
The problem might not be to dramatic and might be possible to solve. But having items unique per menu would solve it right away.

The global approach with what you plan for the next release will only remove the menu ID from Set/Remove, all the rest of the functions will require a Menu ID. I do not know if that is benefit enough to justify a global approach.

_________________
Ciao
toralf
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 10th, 2007, 3:03 pm 
Offline

Joined: October 29th, 2004, 3:35 pm
Posts: 56
Thanks for this great function! I'm using the My Favorites folder script and I was looking for a way to make icons and change menu color. By the other side, I'm looking desperately for a manner to be able to show more than one menu at once. To have for menus showing pressing a hotkey,for example. Is there any way to do it?????? Thanks.


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

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
Its not supported by Windows OS, but I think it can be done using some subclassing. I just don't have desires to do so, so you will have to leave without it.

You can try Black Box for WIndows for uber menu possibilities.

_________________
Image


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: September 11th, 2007, 1:52 am 
Offline

Joined: October 17th, 2006, 4:15 pm
Posts: 7501
Location: Australia
shader wrote:
I'm using the My Favorites folder script and I was looking for a way to make icons and change menu color.
The icons part can be done. To get the associated small icon of a file, look in this thread for Chris' post about SHGetFileInfo().

Quote:
To have for menus showing pressing a hotkey,for example.
Perhaps you could simulate four menus by having a single four-column menu.

The MMenu demo script shows how to use columns. Specifically, this line:
Code:
MMenu_Add( time, "time title 2", "icons\chat.ico", 0, "b| d iv2")
The b| option places the item in a new column. The pipe '|' tells it to show a vertical line between the columns.


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2007, 5:56 am 
Offline

Joined: August 24th, 2005, 5:17 pm
Posts: 1237
When I try the example menu (or make my own), the highlighted item is blue (not red as in the picture on the 1st page) and the text remains black, it doesn't invert the colour, so it can't be read. Any ideas what's wrong/how to change the colours? (I'm using Windows XP, latest AHK version)


Report this post
Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: October 11th, 2007, 8:34 am 
Offline

Joined: May 24th, 2006, 2:49 pm
Posts: 4511
Location: Belgrade
You are probably using some skining application like WindowBlinds.
Exclude AutoHotkey.exe in its config if that is the case.

_________________
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 Previous  1, 2, 3, 4, 5, 6, 7 ... 10  Next

All times are UTC [ DST ]


Who is online

Users browsing this forum: spg SCOTT and 7 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