All Projects → menixator → hotstring

menixator / hotstring

Licence: other
Trigger a Hotstring through dynamic means with Autohotkey

Programming Languages

autohotkey
350 projects

Projects that are alternatives of or similar to hotstring

metaKeyboard
turn a common keyboard into a 61-key keyboard for the keyboard shortcut fun like you, I'm a programer, I want to improve coding efficiency
Stars: ✭ 30 (-18.92%)
Mutual labels:  ahk
YDL
A Simple GUI wrapper around yt-dlp for Windows using AHK
Stars: ✭ 18 (-51.35%)
Mutual labels:  ahk
AHKShortcutLikeMac
An AHK Script for using keyboard shortcuts like MacOS on your Windows
Stars: ✭ 109 (+194.59%)
Mutual labels:  ahk
react-shortcut
Convenient React component that detects if the given key combination is pressed, and triggers a callback
Stars: ✭ 16 (-56.76%)
Mutual labels:  hotkeys
AHK-generator
A single page website to provide a UI for the 3 most common uses for AHK and defining custom hotstrings and hotkeys to trigger them
Stars: ✭ 23 (-37.84%)
Mutual labels:  ahk
AHK MicMute
Control your microphone using keyboard and mouse hotkeys.
Stars: ✭ 67 (+81.08%)
Mutual labels:  ahk
keys
⌨️ Keyboard Shortcuts for 'shiny'
Stars: ✭ 37 (+0%)
Mutual labels:  hotkeys
ScriptUp
All AutoHotkey scripts under one process.
Stars: ✭ 19 (-48.65%)
Mutual labels:  ahk
pyqtkeybind
Global hotkey bindings for Windows and Linux for PyQt apps
Stars: ✭ 43 (+16.22%)
Mutual labels:  hotkeys
InputBot
A Rust library for creating global hotkeys, and emulating inputs.
Stars: ✭ 246 (+564.86%)
Mutual labels:  hotkeys
Chordly
Chordly is a javascript library that may be used to detect and act upon key sequences entered by a user.
Stars: ✭ 14 (-62.16%)
Mutual labels:  hotkeys
JFHotkeyManager
Global hotkey manager for Cocoa
Stars: ✭ 32 (-13.51%)
Mutual labels:  hotkeys
FGO-AHK
FGO的AHK宏脚本:自定义流程刷本(含教程,主要用于3T速刷),抽池子、搓丸子……仅支持安卓模拟器FGO国服。
Stars: ✭ 77 (+108.11%)
Mutual labels:  ahk
Hotkeys
🔤 A small C# (.NET) Library which allows binding of global HotKeys to any Application's Windows (including Windows Apps such as explorer.exe), even in Background. (using P/Invokes)
Stars: ✭ 66 (+78.38%)
Mutual labels:  hotkeys
hotkey
⌨️ cross-platform hotkey package
Stars: ✭ 82 (+121.62%)
Mutual labels:  hotkeys
keybind
ClojureScript key bindings (shortcut) library
Stars: ✭ 85 (+129.73%)
Mutual labels:  hotkeys
intuiter
Global productivity app for anyone who use Windows
Stars: ✭ 24 (-35.14%)
Mutual labels:  ahk
weibo daily hotkey
Weibo's daily TOP5 hotkey. 自动爬取、筛选新浪微博每日热搜词 TOP5。https://github.com/TauWu/weibo_daily_hotkey/blob/master/data/data.md
Stars: ✭ 34 (-8.11%)
Mutual labels:  hotkeys
beoplay-macos-remote-gui
Remote control B&O Beoplay loudspeakers from macOS (PoC)
Stars: ✭ 14 (-62.16%)
Mutual labels:  hotkeys
VMR.ahk
AutoHotkey wrapper class for Voicemeeter's Remote API
Stars: ✭ 22 (-40.54%)
Mutual labels:  ahk

Hotstring

This is a library that adds a dynamic hotstring feature for Autohotkey.

Arguments:

  • trigger - A string/regex that triggers the hotstrings.

  • label - A string to replace the trigger/label to goto/ name of function to call when the hotstring is triggered. If it's a label, the variable $ will contain either the phrase that triggered the hotstring or a MatchObject (If mode == 3) If it's a function and the function takes atleast 1 parameter, the first parameter will be the trigger string, or the Match Object.

  • mode - A number between 1 & 3. 1 creates a case insenstive hotstring, 2 creates a case sensitive hotstring, 3 creates a regex hotstring. Defaults to 1.

  • clearTrigger - Wheather or not to clear the trigger. Defaults to true.

  • cond - A name of a function that is to be called everytime the hotstring is triggered. If this function returns a false value or if it returns nothing, the hotstring is not triggered.

##Examples:

#Include Hotstring.ahk

Hotstring("btw", "by the way") ; Case insensitive.
; btw -> by the way
; BTW -> by the way
; BtW -> by the way
; bTw -> by the way.
; annd so on.

Hotstring("ahk", "autohotkey", 2) ; Case sensitive. 
; only ahk will trigger it. AHK, aHk, or AhK won't trigger it
#Include Hotstring.ahk

Hotstring("toLabel", "label")
return

label:
; $ == "toLabel"
return
#Include Hotstring.ahk
Hotstring("(\d+)\/(\d+)%", "percent",3)
return

percent:
; now $ is a match object.
sendInput, % Round(($.Value(1)/$.Value(2))*100)
; 2/2% -> 100
; 70/100 -> 70%
return
#Include Hotstring.ahk

Hotstring("i)((d|w)on)(t)", "$1'$3",3) 
;DONT -> DON'T
;dont -> don't
;dOnt -> dOn't
;WONT -> WON'T
;and so on.

Hotstring("i)colou?rs","$0 $0 everywhere!", 3) ; Regex, Case insensitive
; colors -> 'colors colors everywhere!'
; colours -> 'colours colours everywhere!'
#Include Hotstring.ahk

Hotstring("trigger", "replace") ;Case Insensitive
return

replace($){
	; $ == 'trigger'
	Msgbox %$% was entered!
}
#Include Hotstring.ahk

Hotstring("i)regex_(trigger)", "replace",3) ;Regex
return

replace($){
	;$ is a match Object
	Msgbox % $.Value(0) . " was entered."
	Msgbox % $.Value(1) . " == 'trigger'"
}
#Include Hotstring.ahk

Hotstring("trigger", "replace")
Sleep,4000
Hotstring("trigger","") ; Removes the hotstring
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].