문자열을 넣으면 postmessage로 한키씩 클릭합니다.
핸들설정은 따로 안되있기때문에 아래쪽함수 ActiveID에 설정하고자 하는 타이틀 넣어주면 됩니다
KeyParam(Key, ByRef wParam, ByRef lParam, ByRef Shift_On)
{
if(key = "a" || key = "A")
{
wParam := 65
lParam := 1966081
if(key = "a")
Shift_On = 0
else
Shift_On = 1
}
if(key = "b" || key = "B")
{
wParam := 66
lParam := 3145729
if(key = "b")
Shift_On = 0
else
Shift_On = 1
}
if(key = "c" || key = "C")
{
wParam := 67
lParam := 3014657
if(key = "c")
Shift_On = 0
else
Shift_On = 1
}
if(key = "d" || key = "D")
{
wParam := 68
lParam := 2097153
if(key = "d")
Shift_On = 0
else
Shift_On = 1
}
if(key = "e" || key = "E")
{
wParam := 69
lParam := 1179649
if(key = "e")
Shift_On = 0
else
Shift_On = 1
}
if(key = "f" || key = "F")
{
wParam := 70
lParam := 2162689
if(key = "f")
Shift_On = 0
else
Shift_On = 1
}
if(key = "g" || key = "G")
{
wParam := 71
lParam := 2228225
if(key = "g")
Shift_On = 0
else
Shift_On = 1
}
if(key = "h" || key = "H")
{
wParam := 72
lParam := 2293761
if(key = "h")
Shift_On = 0
else
Shift_On = 1
}
if(key = "i" || key = "I")
{
wParam := 73
lParam := 1507329
if(key = "i")
Shift_On = 0
else
Shift_On = 1
}
if(key = "j" || key = "J")
{
wParam := 74
lParam := 2359297
if(key = "j")
Shift_On = 0
else
Shift_On = 1
}
if(key = "k" || key = "K")
{
wParam := 75
lParam := 2424833
if(key = "k")
Shift_On = 0
else
Shift_On = 1
}
if(key = "l" || key = "L")
{
wParam := 76
lParam := 2490369
if(key = "l")
Shift_On = 0
else
Shift_On = 1
}
if(key = "m" || key = "M")
{
wParam := 77
lParam := 3276801
if(key = "m")
Shift_On = 0
else
Shift_On = 1
}
if(key = "n" || key = "N")
{
wParam := 78
lParam := 3211265
if(key = "n")
Shift_On = 0
else
Shift_On = 1
}
if(key = "o" || key = "O")
{
wParam := 79
lParam := 1572865
if(key = "o")
Shift_On = 0
else
Shift_On = 1
}
if(key = "p" || key = "P")
{
wParam := 80
lParam := 1638401
if(key = "p")
Shift_On = 0
else
Shift_On = 1
}
if(key = "q" || key = "Q")
{
wParam := 81
lParam := 1048577
if(key = "q")
Shift_On = 0
else
Shift_On = 1
}
if(key = "r" || key = "R")
{
wParam := 82
lParam := 1245185
if(key = "r")
Shift_On = 0
else
Shift_On = 1
}
if(key = "s" || key = "S")
{
wParam := 83
lParam := 2031617
if(key = "s")
Shift_On = 0
else
Shift_On = 1
}
if(key = "t" || key = "T")
{
wParam := 84
lParam := 1310721
if(key = "t")
Shift_On = 0
else
Shift_On = 1
}
if(key = "u" || key = "U")
{
wParam := 85
lParam := 1441793
if(key = "u")
Shift_On = 0
else
Shift_On = 1
}
if(key = "v" || key = "V")
{
wParam := 86
lParam := 3080193
if(key = "v")
Shift_On = 0
else
Shift_On = 1
}
if(key = "w" || key = "W")
{
wParam := 87
lParam := 1114113
if(key = "w")
Shift_On = 0
else
Shift_On = 1
}
if(key = "x" || key = "X")
{
wParam := 88
lParam := 2949121
if(key = "x")
Shift_On = 0
else
Shift_On = 1
}
if(key = "y" || key = "Y")
{
wParam := 89
lParam := 1376257
if(key = "y")
Shift_On = 0
else
Shift_On = 1
}
if(key = "z" || key = "Z")
{
wParam := 90
lParam := 2883585
if(key = "z")
Shift_On = 0
else
Shift_On = 1
}
if(key = "1" || key = "!")
{
wParam := 49
lParam := 131073
if(key = "1")
Shift_On = 0
else
Shift_On = 1
}
if(key = "2" || key = "@")
{
wParam :=50
lParam := 196609
if(key = "2")
Shift_On = 0
else
Shift_On = 1
}
if(key = "3" || key = "#")
{
wParam := 51
lParam := 262145
if(key = "3")
Shift_On = 0
else
Shift_On = 1
}
if(key = "4" || key = "$")
{
wParam := 52
lParam := 327681
if(key = "4")
Shift_On = 0
else
Shift_On = 1
}
if(key = "5" || key = "%")
{
wParam := 53
lParam := 393217
if(key = "5")
Shift_On = 0
else
Shift_On = 1
}
if(key = "6" || key = "^")
{
wParam := 54
lParam := 458753
if(key = "6")
Shift_On = 0
else
Shift_On = 1
}
if(key = "7" || key = "&")
{
wParam := 55
lParam := 524289
if(key = "7")
Shift_On = 0
else
Shift_On = 1
}
if(key = "8" || key = "*")
{
wParam := 56
lParam := 589825
if(key = "8")
Shift_On = 0
else
Shift_On = 1
}
if(key = "9" || key = "(")
{
wParam := 57
lParam := 655361
if(key = "9")
Shift_On = 0
else
Shift_On = 1
}
if(key = "0" || key = ")")
{
wParam := 48
lParam := 720897
if(key = "0")
Shift_On = 0
else
Shift_On = 1
}
if(key = "," || key = "<")
{
wParam := 188
lParam := 3342337
if(key = ",")
Shift_On = 0
else
Shift_On = 1
}
if(key = "." || key = ">")
{
wParam := 190
lParam := 3407873
if(key = ".")
Shift_On = 0
else
Shift_On = 1
}
if(key = "/" || key = "?")
{
wParam := 191
lParam := 3473409
if(key = "/")
Shift_On = 0
else
Shift_On = 1
}
}
PostMessageKeyClick(String)
{
StrCount := strlen(String)
Loop, %StrCount%
{
stringmid, Key, String, A_Index, 1
KeyParam(Key, wParam, lParam, Shift_On)
Sleep, 100
if(Shift_On)
{
PostMessage, 0x100, 16, 2752513,, ahk_id %ActiveID%
PostMessage, 0x100, %wParam%, %lParam%,, ahk_id %ActiveID%
PostMessage, 0x101, %wParam%, %lParam%,, ahk_id %ActiveID%
PostMessage, 0x101, 16, 2752513,, ahk_id %ActiveID%
}
else
{
PostMessage, 0x100, %wParam%, %lParam%,, ahk_id %ActiveID%
PostMessage, 0x101, %wParam%, %lParam%,, ahk_id %ActiveID%
}
}
}