[오토핫키] 캡챠 구현
오토핫키2018. 4. 13. 14:23
; Captcha example by Titan
Gui, + ToolWindow
Pass := Captcha(90, 10)
Go:
MsgBox, 64, Cool, done!`n`nThe code was: %Pass%
{
; Captcha by Titan
w := len * 15 + 10
h := 35
xw := x + 10
Loop, % len
{
key := Pass(1)
keys = %keys%%key%
}
{
yw = 5
dots = %dots%.
Loop, 5
{
yw += 5
}
}
Return, % keys
}
Pass(len=5, chars=0)
{
; Captcha module by Titan
chAlpha = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
chNum = 1234567890
chAlphaNum = %chAlpha%%chNum%
StringSplit, list, chAlphaNum
StringSplit, list, chAlpha
StringSplit, list, chNum
Loop, % len
{
Random, rnd, 1, % list0
i := list%rnd%
pass = %pass%%i%
}
Return, pass
}
{
; Captcha module by Titan
Random, r, % p1, % p2
{
Fonts = Arial,Courier,Courier New,Lucida Console,MS Sans Serif,MS Serif,Tahoma,Times New Roman
StringSplit, Fonts, Fonts, `,
Random, r, 1, %Fonts0%
r := Fonts%r%
}
{
Colours = Black,Green,Silver,Lime,Gray,Olive,White,Yellow,Maroon,Navy,Red,Blue,Purple,Teal,Fuchsia,Aqua
StringSplit, Colours, Colours, `,
Random, r, 1, %Colours0%
r := Colours%r%
}
{
StringSplit, Styles, Styles, `,
Random, r, 1, %Styles0%
r := Styles%r%
}
Return, % r
}
출처: http://nimto.tistory.com/691 [ㄴrㅎnㅂrㄹrㄱi]
'오토핫키' 카테고리의 다른 글
[오토핫키] XOR 암호화/복호화 예제 (0) | 2018.04.18 |
---|---|
[오토핫키] 스톱워치 구현 (0) | 2018.04.13 |
[오토핫키] 티스토리 블로그 인증 (0) | 2018.04.12 |
[오토핫키] Edit 창 누르면 공백으로 바뀌기 (0) | 2018.04.06 |
[오토핫키] 활성화 된 창 제목과 경로 가져오기 (0) | 2018.04.06 |