[ahk]一括定義ホットキー

562 ワード

;  :  CapsLock+    4     16      
;  :sunwin
;  :2015 12 27 18:21:07
conf=
(LTrim Join
1,2,3,4,
q,w,e,r,
a,s,d,f,
z,x,c,v
)

htk:=StrSplit(conf,"`,") ;               

idx := {}  ;            
Loop, Parse, conf, CSV
    idx[A_LoopField] := A_Index


Loop 16
{
	_hotkey :="CapsLock & " . htk[A_Index] 
	Hotkey, %_hotkey%, Handle  ;    , Handle       
}
return

Handle:
	test:=StrSplit(A_thishotkey," & " )  ;       
	Handle(idx[test[2]])  ;               
return

Handle(t)
{
	MsgBox    %t%   
}