I’m trying to achieve following
Pop-up menu that gets label from first column in a separate file (table) , and when clicked/selected it pastes 2nd column contents from the table
EDIT: found something that was previously discussed- menu from a csv file !
viewtopic.php?t=66278#p285071
Menu and actions
Menu and actions
Last edited by S_N on 29 Nov 2021, 21:50, edited 1 time in total.
Re: Menu and actions
It's best if you provide the table, along with a specific example pertaining to it.
Re: Menu and actions
Table file - i’m trying to make simple for someone else to add/edit to it, just by wditing the text not having to deal with coding stuff
Example table i think
Label1, text line of text hwre
Label2, text paragraph
with line breaks
Label3, text something else
Label3(submenu item), text etc
Example table i think
Label1, text line of text hwre
Label2, text paragraph
with line breaks
Label3, text something else
Label3(submenu item), text etc
Re: Menu and actions
Here is a way to get started.
Code: Select all
table =
(
Label1, text line of text hwre
Label2, text paragraph
Label3, text something else
Label3(submenu item), text etc
)
text := {}
For each, line in StrSplit(table, "`n") {
RegExMatch(line, "(.+?),(.+)", part)
If (part1 = "")
Continue
text[part1] := Trim(part2)
Menu, items, Add, %part1%, Paste
}
F3::Menu, items, Show
Paste:
SendInput % "{Text}" text[A_ThisMenuItem]
Return
Re: Menu and actions
Thank you
How do i make sub-menu?
How do i make sub-menu?
Re: Menu and actions
Here is an example. https://www.autohotkey.com/docs/commands/Menu.htm#ExPopup
You would have to decide when to add such a menu.
You would have to decide when to add such a menu.
Who is online
Users browsing this forum: mikeyww and 325 guests