;功能:定义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%个窗口
}