8lwxpg / regexhotstring Goto Github PK
View Code? Open in Web Editor NEWprovide RegEx in hotstring triggering
License: MIT License
provide RegEx in hotstring triggering
License: MIT License
I use:
RegExHotstring("psa(s)?(\W)", "Please see the attached document$1$2", "*C")
! # ^ { } and + will not trigger match when they are the terminal characters. Practically speaking , the only one likely to cause me issue in the day to day is the !.
I've encountered an issue while using the RegExHotstring.ahk script, where dead keys are not being registered as expected. Dead keys, such as '^', '¨', and '´', are not modifying characters when used in conjunction with the script.
Thank you for your assistance.
#Include RegExHotstrings.ahk
Dead keys are keys on a keyboard that don't produce a character on their own when pressed, but instead modify the character that is entered when you press another key immediately after the dead key. These keys are commonly used in languages that require diacritics or accent marks to be placed on top of certain characters. Keyboards designed for languages like French, Spanish, German, or Portuguese often include dead keys to make it easier to input accented characters.
For example, the '^' key is a dead key for adding circumflex accents (ex. â) , the '¨' key is a dead key for adding diaeresis (umlaut) accents (ex. ä). When you press one of these dead keys and then press a letter, the dead key modifies the letter accordingly.
Striking {NumpadEnter} yield no apparent effect with this script running. It is effectively blocked from use.
my script is from demo:
#Requires AutoHotkey v2.0
#Include RegExHotstring.ahk
#SingleInstance Force
; the upmost function will be triggered first
; replace with regex string
RegExHotstring("(\w*)c", call)
; receives RegExMatchInfo
call(match) {
MsgBox("matched: " match[1])
}
when I press a button, it does not do anything untill I press it again. Then it produces one symbol as expected.
e.g. to enter word
example
I need to press
eexxaammppllee
same time hotstring functionality works, e.g. if I enter
eexxaammpplleecc
then it would trigger call function (assuming hitting space at the end)
I am using fresh (just downladed) ahk v2 install, also have v1.1 instaled alongside (ahk claims they compatible to be installed together) and no other scripts running. As soon as I close this test script, doublepress issue gone.
What can I do to debug? where to watch?
Was there ever a version of this script for autohotkey 1.0?
https://github.com/menixator/hotstring
To me, not having any key to be set as activator is a big drawback.
I did script that automatically replaces ';' (semicolon) to either =. -. *. or ! depending on context of entered text (js code) and using regex.
For this to work custom activators needed, so I end up with menixator regex script.
I'm trying to extend my existing Hotkey script with regex hotstrings, based on your script.
Whenever I try to #Include
the RegExHotString.ahk
file, though, my "regular" hotstring definitions stop working.
Example script 1, without #Include RegExHotString.ahk
:
#SingleInstance Force
TrayTip("AHK script '" . A_ScriptName . "' loading ...", , 1)
:X:;dt::SendInput(FormatTime(, "yyyy-MM-dd HH'h'mm"))
#Home::SoundSetMute(!SoundGetMute())
→ the ;dt
hotstring works, the #Home
hotkey works.
Example script 2, with #Include RegExHotString.ahk
and an example regex hotstring to generate a Markdown link:
#SingleInstance Force
TrayTip("AHK script '" . A_ScriptName . "' loading ...", , 1)
:X:;dt::SendInput(FormatTime(, "yyyy-MM-dd HH'h'mm"))
#Home::SoundSetMute(!SoundGetMute())
#Include %A_ScriptDir%\_inc\RegExHotstring.ahk
RegExHotstring(";issue([0-9]+)", "[ISSUE-$1](http://jira.mydomein.com/browse/PROJ-$1)", "O")
→ the #Home
hotkey still works, the ;issue
regex hotstring works... but the regular ;dt
hotstring does NOT work anymore.
I'm guessing this has to do with some interference between the InputHook
in RegExHotString versus my regular hotstrings... but I don't know anything about how those work.
Can you see what's causing the problem? How to make this work?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.