Page 1 of 1

Menu with more then 1 submenu's

Posted: 23 Apr 2019, 19:01
by Ataricx
Hello

I got 2 menu's on this, but i would like to have 3 or more (submenu's)

I already tried it myself, but i don't know how to change this..... i think it's something simple, just 1 or 2 extra lines...

Code: Select all

Menu, klapmenu_programmas, Add, Programma 1, prog1
Menu, klapmenu_programmas, Add, Programma 2, prog2
Menu, MijnMenu, Add, Programma's, :klapmenu_programmas

Menu, MijnMenu, Color, dbdbdb
return

prog1:
return

prog2:
return

~MButton::
HowLong = 0
Loop
{
	HowLong ++
	Sleep, 40
	GetKeyState, MButton, MButton, P
	IfEqual, MButton, U, Break
}
IfLess, HowLong, %UMDelay%, Return

F7::Menu, MijnMenu, Show

Re: Menu with more then 1 submenu's

Posted: 23 Apr 2019, 21:39
by Osprey
Duplicate one of the first two lines, duplicate one of the "prog#" subroutines and change all of the numbers to 3.

Re: Menu with more then 1 submenu's

Posted: 24 Apr 2019, 03:16
by Ataricx
i didnt mean it that way... let me show you a screenshot to be more clear

Re: Menu with more then 1 submenu's

Posted: 24 Apr 2019, 03:49
by just me

Code: Select all

#NoEnv
Menu, klapmenu_programmas_submenu1, Add, Programma 3 , prog3
Menu, klapmenu_programmas_submenu1, Add, Programma 4 , prog4
Menu, klapmenu_programmas_submenu1, Color, dbdbdb

Menu, klapmenu_programmas, Add, Programma 1, prog1
Menu, klapmenu_programmas, Add, Programma 2, prog2
Menu, klapmenu_programmas, Add, submenu, :klapmenu_programmas_submenu1
Menu, klapmenu_programmas, Color, dbdbdb

Menu, MijnMenu, Add, Change..., Change
Menu, MijnMenu, Add, Exit, Exit
Menu, MijnMenu, Add, Programma's, :klapmenu_programmas
Menu, MijnMenu, Color, dbdbdb
Return

F7::Menu, MijnMenu, Show

prog1:
prog2:
prog3:
prog4:
Change:
ToolTip, %A_ThisLabel% - %A_ThisMenuItem%
SetTimer, RemoveTT, -1000
Return

Exit:
ExitApp

RemoveTT:
ToolTip
Return

Re: Menu with more then 1 submenu's

Posted: 24 Apr 2019, 04:28
by Ataricx
That does the trick, thank you very much @just me

also thanks to @Osprey

Re: Menu with more then 1 submenu's

Posted: 24 Apr 2019, 04:56
by Ataricx
Just 1 question, is it possible to add an icon in front of or after a line?

see example:

Re: Menu with more then 1 submenu's

Posted: 24 Apr 2019, 17:15
by Osprey
Ataricx wrote:
24 Apr 2019, 04:56
Just 1 question, is it possible to add an icon in front of or after a line?

see example:
Yes. Look up "Menu Icon" in the help file's Index.

Re: Menu with more then 1 submenu's

Posted: 25 Apr 2019, 06:15
by Ataricx
i found this, but i dont know how to implement this
https://autohotkey.com/docs/commands/Menu.htm#MenuIcon

Re: Menu with more then 1 submenu's

Posted: 25 Apr 2019, 11:27
by StefOnSteroids
I think you have to attach the icon with a sepearate line for each icon.
Try something like this:

Code: Select all

Menu, klapmenu_programmas, Icon, Programma 1, %A_ScriptDir%\IconFile.ico

Re: Menu with more then 1 submenu's

Posted: 25 Apr 2019, 16:45
by Ataricx
great @StefOnSteroids the menu looks more done now :)

thanx alot :)