If you use notepad+ as an editor for Autolisp, the CTRL+ALT+b leaves a lot to be desired when it comes to selecting between brackets.
The VLIDE double-click is much more satisfying.
So here is an AutoHotKey script that gives you this functionnality while preserving the normal Dbl-Click of notepad+:
#Requires AutoHotkey v2.0
#SingleInstance Off
; 1. Set up a unique communication highway (MsgNumber 0x401)
OnMessage(0x401, ReceiveCloseSignal)
ReceiveCloseSignal(wParam, lParam, msg, hwnd) {
ExitApp
}
; 2. Find any running old instance (ignoring itself) and send it the "Self-Destruct" signal
DetectHiddenWindows True
if (oldScriptHwnd := WinExist(A_ScriptFullPath " ahk_class AutoHotkey")) {
if (oldScriptHwnd != A_ScriptHwnd) { ; Ensure the script doesn't close itself!
PostMessage(0x401, 0, 0, , "ahk_id " oldScriptHwnd)
WinWaitClose("ahk_id " oldScriptHwnd, , 2)
}
}
; 3. Automatically relaunch the script using UI Access to bypass UAC entirely
if !A_IsCompiled && !InStr(A_AhkPath, "_UIA.exe") {
uiaPath := RegExReplace(A_AhkPath, "\.exe$", "_UIA.exe")
if FileExist(uiaPath) {
try {
Run('"' uiaPath '" "' A_ScriptFullPath '"')
ExitApp
}
}
}
; 4. Your Application-Specific Hotkeys
#HotIf WinActive("ahk_class Notepad++")
~LButton:: {
static lastClick := 0
currentClick := A_TickCount
if (currentClick - lastClick < DllCall("GetDoubleClickTime")) {
KeyWait("LButton")
Sleep(60)
SendEvent("^!b")
lastClick := 0
} else {
lastClick := currentClick
}
}
#HotIf
Link to download AutoHotKey https://www.autohotkey.com also available on Microsoft app store (Free)
NppBrackets.ahk