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

Features wanted...
Post Reply
MBaas
Posts: 684
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

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.
To see the attached files, you need to log into the forum.
____________________________________________________________________________________
Happy user. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

highend
Posts: 14953
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: 4462
Joined: 28 Feb 2012 19:27
Location: Windows 11, 25H2 Build 26200.8737 at 100% 2560x1440

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.

MBaas
Posts: 684
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. Screen scaling 100% and W11Pro [Version 10.0.26200.7922], XY 28.30.0600 * * LinkTree

Post Reply