Menu with more then 1 submenu's

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Menu with more then 1 submenu's

23 Apr 2019, 19:01

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
Attachments
snipaste_20190424_020147.png
snipaste_20190424_020147.png (18.74 KiB) Viewed 1797 times
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Menu with more then 1 submenu's

23 Apr 2019, 21:39

Duplicate one of the first two lines, duplicate one of the "prog#" subroutines and change all of the numbers to 3.
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Menu with more then 1 submenu's

24 Apr 2019, 03:16

i didnt mean it that way... let me show you a screenshot to be more clear
Attachments
snipaste_20190424_101535.png
snipaste_20190424_101535.png (8.96 KiB) Viewed 1763 times
just me
Posts: 9495
Joined: 02 Oct 2013, 08:51
Location: Germany

Re: Menu with more then 1 submenu's

24 Apr 2019, 03:49

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
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Menu with more then 1 submenu's

24 Apr 2019, 04:28

That does the trick, thank you very much @just me

also thanks to @Osprey
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Menu with more then 1 submenu's

24 Apr 2019, 04:56

Just 1 question, is it possible to add an icon in front of or after a line?

see example:
Attachments
snipaste_20190424_115533.png
snipaste_20190424_115533.png (5.04 KiB) Viewed 1740 times
Osprey
Posts: 453
Joined: 18 Nov 2017, 05:50

Re: Menu with more then 1 submenu's

24 Apr 2019, 17:15

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.
StefOnSteroids
Posts: 77
Joined: 08 Aug 2015, 10:22

Re: Menu with more then 1 submenu's

25 Apr 2019, 11:27

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
Ataricx
Posts: 34
Joined: 24 Feb 2019, 06:12

Re: Menu with more then 1 submenu's

25 Apr 2019, 16:45

great @StefOnSteroids the menu looks more done now :)

thanx alot :)

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: herzog, OrangeCat and 133 guests