How to add text filter for items menu ?

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
jkeks
Posts: 60
Joined: 20 Oct 2019, 00:24
Contact:

How to add text filter for items menu ?

Post by jkeks » 09 Jan 2023, 23:52

I have popup menu, and want to add filter for items? how to do it ?
image.png
image.png (3.36 KiB) Viewed 171 times
code is very simple:

Code: Select all

#SingleInstance, force

Menu, timeMenu, Add, &1 today,    today
Menu, timeMenu, Add, &2 +1 Month, today1
Menu, timeMenu, Add, &3 +3 Month, today3
Menu, timeMenu, Add, &4 +6 Month, today6
Menu, timeMenu, Add, &5 +12 Month,today12
Menu, timeMenu, Add, &6 TimeStamp,timestamp
Menu, timeMenu, Add, &7 PassGen,  passgen
...

today:
  FormatTime, today,, dd.MM.yyyy
  Send, %today%
return
...
idea is in this:
I press d1, and Enter, then I have launch code in function today:
I press d2, and Enter, then I have launch code in function today1:
I press hello, and Enter, then I have launch code in function helloWorld:

User avatar
mikeyww
Posts: 27366
Joined: 09 Sep 2014, 18:38

Re: How to add text filter for items menu ?

Post by mikeyww » 10 Jan 2023, 00:03

Code: Select all

#Requires AutoHotkey v1.1.33

Menu timeMenu, Add, &1 today,    today
Menu timeMenu, Add, &2 +1 Month, today
Menu timeMenu, Add, &3 +3 Month, today
Menu timeMenu, Add, &4 +6 Month, today
Menu timeMenu, Add, &5 +12 Month,today

d::Menu timeMenu, Show

today:
FormatTime today,, dd.MM.yyyy
SendInput % today
Return
Your next round of editing looks not very simple to me!

GUI may be easier for complex filtering. viewtopic.php?p=500984#p500984

See A_ThisMenuItem.

Post Reply

Return to “Ask for Help (v1)”