get("listofcommands",..) - kbd-accelerators

Features wanted...
Post Reply
MBaas
Posts: 578
Joined: 15 Feb 2016 21:08

get("listofcommands",..) - kbd-accelerators

Post by MBaas »

As the subject says.

Proof:
17-01-_2021_19-16-51.png
17-01-_2021_19-16-51.png (6.55 KiB) Viewed 589 times

Code: Select all

gettoken(get("listofcommands"),396,<crlf>);
#1407	User | Go To | Root	
I'd like to use it in a popupnested, so the accelerator would be useful to have.
______________________________________________
Happy user ;-)

highend
Posts: 13315
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: get("listofcommands",..) removes kbd-accelerators

Post by highend »

I don't see a bug here. List of All Commands does not provide that information (and it never has).

You are proving it by posting #1407 while you are showing #1404 :party:

I'll move this to Wishes...

I'll guess the best way would be to add flags=4 for the commands to include their accelerator.
Don't make this the default without a new flag, it would break (my) existing scripts :mrgreen:
One of my scripts helped you out? Please donate via Paypal

klownboy
Posts: 4139
Joined: 28 Feb 2012 19:27

Re: get("listofcommands",..) - kbd-accelerators

Post by klownboy »

highend beat me to it, but you can use "1" flag with get("listfofcommands") to append Command IDs and use "2" flag to append keyboard shortcuts per the help file, So...

Code: Select all

 $accel = gettoken(gettoken(get("listofcommands",2),320,<crlf>), "-1", "<tab>");  // keyboard shortcut alone
 $command = gettoken(get("listofcommands",2),320,<crlf>);   //the entire command line
 e $accel;
 e $command;
 
I'm not sure if that's what you're after.
Windows 11, 23H2 Build 22631.3447 at 100% 2560x1440

MBaas
Posts: 578
Joined: 15 Feb 2016 21:08

Re: get("listofcommands",..) - kbd-accelerators

Post by MBaas »

highend: sorry for the confusion. I thought that it was a bug and wanted to post it there. But then I went back and RTFM'ed again and noticed that flags can be used to include keyboard shortcuts, not accelerators. So I ended the msg as if it was a feature request - but then forgot to update title and post to a different forum. Thanks for rectifying that!

klownboy: I think this answered your comment :wink:
______________________________________________
Happy user ;-)

Post Reply