Hotkey Help - Display Active AHK Hotkeys and Hotstrings

Post your working scripts, libraries and tools
FanaticGuru
Posts: 1356
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: 1356
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: 50
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?
dathan_neal
Posts: 7
Joined: 19 Apr 2019, 13:16

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

19 Apr 2019, 13:20

Thank you! New to AHK and this tool is exactly what I was hoping for. Now to just see if I can get these hotkeys to respond a little quicker....
nichatr
Posts: 1
Joined: 17 May 2019, 01:43
GitHub: nichatr

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

17 May 2019, 01:49

Excellent utility. It is what I wanted for my autohotkey main script. Thank you very much!
FanaticGuru
Posts: 1356
Joined: 30 Sep 2013, 22:25

Re: Hotkey Help Display Active AHK Hotkeys and Hotstrings

18 May 2019, 18:27

ArcherHak wrote:
18 May 2019, 07:42
Kudos

Thanks for that but surely there is a way to create a custom button and script that effectively simulates Ctrl P - so one can go in one step to the Print options box?

V

There is not currently an option to print althought you can hit Win+Alt+F1 to bring up the settings dialog where you can then export to a text file. Then you could print the text file manually.

Printing is a complex task due to the wide range of possible printers and drives. It is not something you normally see directly form AutoHotkey.

The easiest approach is passing the task off to another program in Windows.

Could use something like: Run, print "My File.txt",, HIDE to print a file from the Windows default word processor using the default printer and settings. If you want to pick printers and such then all AutoHotkey can do easily is open the word processor for you.

Not sure if it is worth the effort adding a Ctrl-P shortcut to print if all it does is open the Help dialog in Notepad.

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
tdalon
Posts: 8
Joined: 21 Apr 2017, 07:19
Google: thierrydalon
GitHub: tdalon

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

07 Jun 2019, 02:53

This is great! Many thanks for sharing
I have two wishes:
- Support for clickable link - for the usecase that you want to link for a detailed user documentation and be able to open the link right from the GUI
- Possibility to add line between hotkeys to be displayed in the GUI to mark for example for which application the hotkey is defined
My script is built like this:
; All Applications
#ifWinActive,ahk_group Explorer
... here some hotkeys defined
#IfWinActive,ahk_group Browser
... here some other hotkeys

And I would like in the GUI to have some separator line/comment for each application scope.

Maybe one could add a special keyword to be parsed by Hotkey Help for this
FanaticGuru
Posts: 1356
Joined: 30 Sep 2013, 22:25

Re: Hotkey Help - Display Active AHK Hotkeys and Hotstrings

07 Jun 2019, 13:34

tdalon wrote:
07 Jun 2019, 02:53
This is great! Many thanks for sharing
I have two wishes:
- Support for clickable link - for the usecase that you want to link for a detailed user documentation and be able to open the link right from the GUI
- Possibility to add line between hotkeys to be displayed in the GUI to mark for example for which application the hotkey is defined
My script is built like this:
; All Applications
#ifWinActive,ahk_group Explorer
... here some hotkeys defined
#IfWinActive,ahk_group Browser
... here some other hotkeys

And I would like in the GUI to have some separator line/comment for each application scope.

Maybe one could add a special keyword to be parsed by Hotkey Help for this
Here is how I handle scope:

Code: Select all

================================ SHORTCUTS =================================
Win+Alt+S Up            <-- (Adobe Acrobat) : PDF Secure
Win+Ctrl+S Up           <-- (Adobe Acrobat) : PDF Unsecure
Win+V                   <-- (Adobe Acrobat) : Set Properties (Page Only, Single Page, Fit Page)
F12                     <-- (Excel) : Fill Active Cell - *No Fill*
F8                      <-- (Excel) : Fill Active Cell - Cycle Standard Colors
Ctrl+F9                 <-- (Excel) : Fill Active Cell - Dark Red
Ctrl+F11                <-- (Excel) : Fill Active Cell - Green
F11                     <-- (Excel) : Fill Active Cell - Light Green
Ctrl+F10                <-- (Excel) : Fill Active Cell - Orange
F9                      <-- (Excel) : Fill Active Cell - Red
F10                     <-- (Excel) : Fill Active Cell - Yellow
Ctrl+F12                <-- (Excel) : Hide Columns
Alt+F12                 <-- (Excel) : Hide Rows
Shift+F12               <-- (Excel) : Unhide Range / All
Shift+Tab               <-- (OneNote) : Insert Tab with /t
Win+J                   <-- (Outlook) : Junk / Block Sender
Win+Ctrl+E              <-- File Explorer : Open @ Documents
Win+Ctrl+Alt+E          <-- File Explorer : Open @ Pictures
Win+T                   <-- Outlook : New Task
Win+Ctrl+T              <-- Outlook : Open Tasks
If the hotkey is specific to an app then I put it at the first of the comment with a colon. If the app name is in () it means it must be the active window.

Separator lines or banners are problematic because of sorting. Grouping things under group headings is tricky when sorting. This is logistically difficult. I basically group things by manipulating the sort order with special characters like (~* etc.

As far as links, I assume you are talking about a URL hyperlink. That is somewhat doable. There are two ways. One is to make the GUI an ActiveX control which accepts html code. I am not sure of the ramifications of that. It could be good as it would allow all kinds of html formatting. It would require quite a bit of testing as this would be a far reaching code change with could have some unexpected consequences. The other is some AHK trickery to determine where you click in an Gui and handle it more manually by AHK. I will look in to it when I have some time.

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

Return to “Scripts and Functions”

Who is online

Users browsing this forum: Newbie0919 and 61 guests