다음은 타이머를 사용하여 MsgBox 대화상자의 버튼 이름을 바꾸는 예제입니다. 버튼 이름은 바뀌더라도, IfMsgBox 명령어는 여전히 버튼이 그의 원래 이름으로 참조되기를 요구합니다.
이 스크립트 내려받기 | 다른 샘플 스크립트 | 홈으로
#SingleInstance
SetTimer, ChangeButtonNames, 50
MsgBox, 4, Add or Delete, Choose a button:
IfMsgBox, YES
MsgBox, You chose Add.
else
MsgBox, You chose Delete.
return
ChangeButtonNames:
IfWinNotExist, Add or Delete
return ; 계속 대기.
SetTimer, ChangeButtonNames, off
WinActivate
ControlSetText, Button1, &Add
ControlSetText, Button2, &Delete
return