Hotkey Help - Display Active AHK Hotkeys and Hotstrings

Post your working scripts, libraries and tools
FanaticGuru
Posts: 1272
Joined: 30 Sep 2013, 22:25

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

14 Jan 2019, 14:23

zhaowu wrote:
14 Jan 2019, 09:21
Wigi wrote:
04 Jan 2019, 20:30
Many thanks, this last update (2019 01 03) indeed identifies the square key and Shift-square key, that I use in 4 hotkeys:

01.png
Thanks for sharing this little useful tool. :D

This reply is to post a bug and solution concerning duplicate entries. Somehow, each entry displays twice for #include files. I do not fully understand the code, so I just add U option to remove duplicates in each sort as below.

Code: Select all

Sort, Display_Section, U
I have tested with hotkeys defined in an #include file and did not end up with duplicate entries.

I was able to replicate this behavior by having an #include file include itself but that seems more like the wrong use of #include. And in that case the hotkey really is in the script twice.

Now if the code actually defines the same hotkey twice that is a different matter. You can have the same hotkey defined twice, usually using the #if command but you can have one hotkey override another hotkey.

The problem with just eliminating all duplicates is that sometimes you really do have duplicates that need to be displayed. For example I personally have F12 defined four times. Each hotkey does a different thing depending on what is active at the moment. It is my go-to context sensitive hotkey.

Can you post code that creates duplicate entries?

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
FanaticGuru
Posts: 1272
Joined: 30 Sep 2013, 22:25

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

14 Jan 2019, 14:29

r2997790 wrote:
14 Jan 2019, 09:57
So looking forward to the multiple line hotstring implementation if you can wrangle the RegEx to do it FantasticGuru --- it will help me clean up my messy hotstrings files enormously.

Such a useful and clever bit of scripting.

My testing works on multi-line hotstrings.

Code: Select all

::btw::	; <-- By The Way
	MsgBox You typed "btw".
return
This produces the Help entry I would expect.

Can you post an example of a multi-line hotstring that is not caught by Hotkey Help?

FG
Hotkey Help - Help Dialog for Currently Running AHK Scripts

AHK Startup - Consolidate Multiply AHK Scripts with one Tray Icon

[Function] Timer - Create and Manage Timers
r2997790
Posts: 36
Joined: 02 Feb 2017, 02:46

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

16 Jan 2019, 01:56

FanaticGuru wrote:
14 Jan 2019, 14:29
Can you post an example of a multi-line hotstring that is not caught by Hotkey Help?
FG, here's an example of a multi-line hotstring, which doesn't get parsed for me:

Code: Select all

::bwfg::
(
Best Wishes,
FantasticGuru
)
This returns:

Code: Select all

<HS>  bwfg               = 
Could the code be adapted to allow multi-line hotstrings like this to be parsed?

Return to “Scripts and Functions”

Who is online

Users browsing this forum: cocobanana, zhaowu and 51 guests