Help in scripting subMenus
Posted: 07 Dec 2019, 02:58
Hi Everyone,
I have script that I found on the web that close to my need.
I need help in scripting to modify this code so it will have simple submenus
Example for sub menu structure:
|Menu:
|--subMenu1
|------item1
|------item2
|--subMenu2
|------item3
|------item4
Thanks in advance for your help
I have script that I found on the web that close to my need.
I need help in scripting to modify this code so it will have simple submenus
Code: Select all
::nu::
v = 1=a,"2=b"
TextMenu(v)
return
TextMenu(TextOptions) {
arrVal := []
fn := Func("MenuAction").Bind( arrVal )
Loop, Parse, TextOptions, CSV
{
arr := StrSplit(A_LoopField, "=", " ")
arrVal.push(arr[2])
Menu, MyMenu, Add, % arr[1], % fn
}
Menu, MyMenu, Show
Menu, MyMenu, DeleteAll
}
MenuAction(arrVal) {
SendInput % "{Text}" . arrVal[A_ThisMenuItemPos]
}
Example for sub menu structure:
|Menu:
|--subMenu1
|------item1
|------item2
|--subMenu2
|------item3
|------item4
Thanks in advance for your help