티스토리 뷰

Code/Study

[AutoHotkey] SetTimer & PostMessage

Hide Code 2010. 4. 18. 12:15
"메모장 정보" 창이 뜰 때 마다 "확인" 버튼을 자동으로 클릭해주는 예제

#Persistent

BM_CLICK := 245

SetTitleMatchMode, Regex
OnExit, ExitSub
SetTimer, MyLabel, 1000
return

MyLabel:
PostMessage, BM_CLICK , 0, 0, Button1, 메모장 정보
return

ExitSub:
SetTimer, MyLabel, Off
ExitApp ; The only way for an OnExit script to terminate itself is to use ExitApp in the OnExit subroutine.



#Persistent

WM_CLOSE := 0x10
WM_COMMAND := 0x111
BM_CLICK := 0XF5

SetTitleMatchMode, Regex
OnExit, ExitSub
SetTimer, MyLabel, 5000
return

MyLabel:
PostMessage, WM_COMMAND , 0X41, 0, , 메모장
Sleep, 1000
PostMessage, BM_CLICK , 0, 0, Button1, 메모장 정보
return

ExitSub:
SetTimer, MyLabel, Off
ExitApp


'Code > Study' 카테고리의 다른 글

[PerlNET] Regex (Perl C# Mix)  (0) 2008.11.09
[Perl] Cocoa (pl pm sample)  (0) 2008.11.09
[PerlNET] CIty (Mix Perl & C#)  (0) 2008.11.09
[Perl] BeeConverter (Convert HTML Entity to Unicode Character)  (0) 2008.11.09
[C/C++ vs C#] static (1)  (0) 2008.07.16
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/10   »
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31
글 보관함