Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Taskbar elements as menuItems
#1
Hi

I would like to have a way to access taskbar elements quicker by opening a menu at current cursor position containing a list of those elements.
I would also like a way to filter those elements. For example to show only pdf files in the menu.
How can I do that? (general idea and functions)

Thanks.
#2
Macro Macro2659
Code:
Copy      Help
;Shows dynamically created menu of windows.

ARRAY(int) aw; GetMainWindows aw
ARRAY(__Hicon) ai.create(aw.len)
str s t
int i h w c
for i 0 aw.len
,w=aw[i]
,h=GetWindowIcon(w)
,ai[i]=h
,t.getwintext(w)
,t.findreplace(" :" " [91]58]") ;;escape :
,t.escape(1) ;;escape " etc
,s+F"{t} :act {w}; err * {ai[i]}[]"
;out s

i=DynamicMenu(s "" 1)
if(i) outw aw[i-1]
#3
Thank you!
#4
I get this:
Error in Smart_taskbar_menu: expected 1 arguments, not 2.
From -> GetMainWindows aw 4
#5
Remove 4 or download QM 2.3.4 beta.
4 is a new flag "all Win10 desktops".
#6
It works.
For win 7 QM 2.3.6.5 removed 4 from GetMainWindows and then h=GetWindowIcon(w).
#7
Hi
How can I use the same button that opened the menu to advance down in menu?

Thanks
#8
To select menu item?
#9
Yes, to select the next item in menu.
#10
Macro Macro2694
Code:
Copy      Help
ARRAY(int) aw; GetMainWindows aw
ARRAY(__Hicon) ai.create(aw.len)
str s t
int i h w c
for i 0 aw.len
,w=aw[i]
,h=GetWindowIcon(w)
,ai[i]=h
,t.getwintext(w)
,t.findreplace(" :" " [91]58]") ;;escape :
,t.escape(1) ;;escape " etc
,s+F"{t} :act {w}; err * {ai[i]}[]"
;out s

mac "sub.SelectMenuItem"
i=DynamicMenu(s "" 1)
if(i) outw aw[i-1]


#sub SelectMenuItem
int w=wait(10 WV win("" "#32768" "qm"))
key DD ;;Down arrow 2 times


Forum Jump:


Users browsing this thread: 1 Guest(s)