This, and future, webinars are going to be “working sessions” where we help people with their scripts or work-through a script from the forum, etc. If you have suggestions / problems and want to submit a script for the next webinar, email me at [email protected]
Video Hour 1: High-level overview: Hour 1
Video Hour 2: Q&A: Hour 2
Here is the script that Maestrith (Chad Wilson, author of AHK Studio) worked out with Dale
#SingleInstance,Force #Persistent global Info SetHotkeys(1) for a,b in Info:={"c99":"()","c88":"[]","c77":"{{}{}}"}{ Hotstring(":X*:" a,"HString") } return KeyEvent(a*){ delay := A_TickCount + 375 ;wait this time in ms to cap letter, lower number = smaller wait capped := false key := SubStr(A_ThisHotkey,2,1) ;hotkey is ~a etc, so remove the ~ while(GetKeyState(key,"P")) { if ( (!capped) AND (a_tickcount > delay)) { SendInput, {BackSpace}{shift Down}%key%{shift Up} hotkey, %key%,nada,on ;assign key to a nil event, so that windows doesn't spam it ie aaaaaaa capped := true ;capped set to true so that script does not repeat } } if (capped) hotkey,~%key%,keyEvent,on ;assign key back to this event } HString(){ static Key String:=SubStr(A_ThisHotkey,InStr(A_ThisHotkey,":",,,2)+1) SendInput,% Info[String] "{Left}" Input,Key,L1 SendInput,+{%Key%} return } return nada: return SetHotkeys(On:=0){ Alphabet := "abcdefghijklmnopqrstuvwxyz-=,./;'[]\``" for a,b in StrSplit(Alphabet){ Hotkey,~%b%,KeyEvent,% (On?"On":"Off") } return }
Sign up for future webinars
See past AutoHotkey webinars