Skip to content

Instantly share code, notes, and snippets.

@digitalfun
Created December 18, 2017 14:51
Show Gist options
  • Save digitalfun/f00fc52c5953b832c7dae618b482f700 to your computer and use it in GitHub Desktop.
Save digitalfun/f00fc52c5953b832c7dae618b482f700 to your computer and use it in GitHub Desktop.
Autohotkey App-helper script template
/*md
- File: filename.ahk; Type: Autohotkey script
- AHK Version: 1.0.0
- Author:
- Copyright:
- Notes:
*/
MYVERSION=1.0.0
;Menu, Tray, Icon, icon.ICO, 1
Menu, Tray, Tip, App-Helper by v%MYVERSION%
/*md
VERSION HISTORY:
------------------------------
- 1.00:
* initial release
*/
#Persistent
#SingleInstance
SetTitleMatchMode, 2
; 1: A window's title must start with the specified WinTitle to be a match.
; 2: A window's title can contain WinTitle anywhere inside it to be a match.
; 3: A window's title must exactly match WinTitle to be a match.
/* GLOBALS */
; ...
;----------------------------------
; GUI stuff
;----------------------------------
;Tray-menu entry
Menu, tray, NoStandard ;remove standard items
Menu, tray, add ; Separator line.
Menu, tray, add, Hotkeylist, subShowInfo
Menu, tray, add, ; Seperator line
Menu, tray, add, Exit, subExit
/*md
Hotkeys
=================================
Key Overview
---------------
- [link](https://autohotkey.com/docs/Hotkeys.htm)
- `#`: Windows-logo-key
- `!`: Alt
- `^`: Control
- `+`: Shift
- `&`: An ampersand may be used between any two keys or mouse buttons to combine them into a custom hotkey.
- `<`: Use the left key of the pair. e.g. `<!a` is the same as `!a` except that only the left Alt key will trigger it.
- `>`: Use the right key of the pair.
- `<^>!`: AltGr (alternate graving). If your keyboard layout has an AltGr key instead of a right-Alt key, this series of symbols can usually be used to stand for AltGr.
*/
/*md
hotkey: `[key]`
---------------------
description
*/
key::
; ...
Return
;----------------------------------
; Main
;----------------------------------
gosub subShowInfo
Return ; Main
subExit:
ExitApp
Return
subShowInfo:
msg =
(LTrim
KEYBOARD:
[key] | description
)
MsgBox, %msg%
Return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment