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
Guest_AutoHotkey_L
  • Guests
  • Last active:
  • Joined: --
Tried MMenu with AHK_L (A_AhkVersion reports 1.0.48.05.L52 here).

A search-and-replace of square brackets (left and right) with a suitable replacement character -- I tried an underscore -- in the code portion of MMenu.ahk seemed to result in a mostly-functioning _MMenuTest.ahk.

The icon for the first menu item doesn't appear to be visible for some reason but apart from that, so far nothing obvious seems to be broken.

Has anyone else tried anything similar? Or have any comments about things that might not (or do not) work?

Deo
  • Members
  • 199 posts
  • Last active: Jan 31 2014 03:19 PM
  • Joined: 16 May 2010
Lexikos
Thank you for this great advice, i will try to fix it

BTW i found that handler subroutine for items which was right-clicked won't work, it doesn't set variables M_MENU, M_TITLE, M_ID

Deo
  • Members
  • 199 posts
  • Last active: Jan 31 2014 03:19 PM
  • Joined: 16 May 2010
hey guys
do anyone have an idea how to make pop up menu transparent?
I searched entire forum for this and tried fgured somthing out on MSDN but it seems i need a lil help on this

Aero98
  • Members
  • 112 posts
  • Last active: Mar 29 2013 03:42 PM
  • Joined: 08 Jan 2009
Ok I looked and I could not find it any where, so I am sorry if this has been answered. What I am trying to do is write a universal menu option for my department. I would like to add an option to allow the users to select their own background and text colors for the menu and save it to an ini file. When the app loads (I would have it automatically reload when they select a new color) I would like to have the menu load the colors from the ini.

The issue I am running into is that I can get the menu to load either the background color, or the text color, but not both. I am probably just doing something wrong.

This works:
bkcolor = 00ffff ;Loaded from ini
txtcolor = 0000ff ;loaded from ini

Notes := MMenu_Create("s32 t"txtcolor)

so does this:
bkcolor = 00ffff ;Loaded from ini
txtcolor = 0000ff ;loaded from ini

Notes := MMenu_Create("s32 c"bkcolor)

But this does not, (I am sure I am doing it wrong)
bkcolor = 00ffff ;Loaded from ini
txtcolor = 0000ff ;loaded from ini

Notes := MMenu_Create("s32 t"txtcolor . "c"bkcolor)

So, how do I get both to load? Is it even possible? And, I am I missing something simple and pulling a newb move? :shock:
(\__/) This is Bunny.
(='.'=) Copy and paste Bunny onto your signature.
(")_(") Help Bunny gain World Domination.

majkinetor
  • Moderators
  • 4512 posts
  • Last active: May 20 2019 07:41 AM
  • Joined: 24 May 2006
MMenu_Create("s32 t" txtcolor " c" bkcolor)

Posted Image

Aero98
  • Members
  • 112 posts
  • Last active: Mar 29 2013 03:42 PM
  • Joined: 08 Jan 2009

MMenu_Create("s32 t" txtcolor " c" bkcolor)


I thought I tried that but I had
MMenu_Create("s32 t"txtcolor "c"bkcolor)

I guess I need to learn how to properly add spaces, lol. :roll:
(\__/) This is Bunny.
(='.'=) Copy and paste Bunny onto your signature.
(")_(") Help Bunny gain World Domination.

Aero98
  • Members
  • 112 posts
  • Last active: Mar 29 2013 03:42 PM
  • Joined: 08 Jan 2009
majkinetor, I wanted to say that first, you are awesome. I love the script. I do have one question though, I use the following code to allow users to pick their own custom colors and it return in RGB, but your code seems to be in BGR. Is there a way to switch this around?

Gui, 99:+LastFound
Gui, 99:Show, w453 h324 Hide
hwnd := WinExist()
color := ChooseColorH( 0x445511, hwnd )
IniWrite, %color%, %A_windir%\menu2.ini, Options, BackgroundColor
reload
return

ChooseColorH( Color=0x0, hWnd=0x0, Flags=0x2 )  { ; CC_FULLOPEN := 0x2
 VarSetCapacity(CC,36+64,0), NumPut(36,CC), NumPut(hWnd,CC,4), NumPut(Color,CC,12)
 NumPut(&CC+36,CC,16), NumPut(Flags,CC,20), DllCall( "comdlg32\ChooseColorA", Str,CC )
 Hex:="123456789ABCDEF0",   RGB:=&CC+11
 Loop 3
  HexColorCode .=  SubStr(Hex, (*++RGB >> 4), 1) . SubStr(Hex, (*RGB & 15), 1)
Return HexColorCode
}

(\__/) This is Bunny.
(='.'=) Copy and paste Bunny onto your signature.
(")_(") Help Bunny gain World Domination.