0w0

[autohotkeyBase] 02.MessageBox(msgbox), 메시지박스 본문

Coding/Autohotkey

[autohotkeyBase] 02.MessageBox(msgbox), 메시지박스

0w0 2020. 1. 5. 16:29
728x90
반응형

● Msgbox

- 메시지박스 제작

- 형식

Msgbox, [컨텐츠]

Msgbox, [옵션], [타이틀], [컨텐츠], [타임아웃]

 

예시

F4::
msgbox, hi
return
F5::
msgbox, 4,title,hello,2
return

 

메시지 옵션

- 버튼의 종류를 옵션을 통해 지정

버튼 옵션 스크립트 예시

msgbox, 0,title,hello_옵션0,5

msgbox, ,title,hello_옵션0,5

F1::
msgbox, 0,title,hello_옵션0,5
return

;확인

;OK

msgbox, 1,title,hello_옵션1,5

F2::
msgbox, 1,title,hello_옵션1,5
return

;확인 취소

;OK Cancel

msgbox, 2,title,hello_옵션2,5

F3::
msgbox, 2,title,hello_옵션2,5
return

;중단 다시시도 무시

;Abort Retry Ignore

msgbox, 3,title,hello_옵션3,5

F4::
msgbox, 3,title,hello_옵션3,5
return

;예 아니오 취소

;Yes No Cancel

msgbox, 4,title,hello_옵션4,5

F5::
msgbox, 4,title,hello_옵션4,5
return

;예 아니오

;Yes No

msgbox, 5,title,hello_옵션5,5

F6::
msgbox, 5,title,hello_옵션5,5
return

;다시시도 취소

;Continue Cancel

msgbox, 6,title,hello_옵션6,5

F7::
msgbox, 6,title,hello_옵션6,5
return

;취소 다시시도 계속

;Cancel Retry Continue

 

기호 옵션 (버튼옵션에 더해서 사용) 아이콘
16 금지(X)
32 물음표(?)
48 주의(!)
64 정보(i)
262144 MsgBox 항상 위로 띄위기

 

 

메시지 옵션 3 조건문

- YES, NO, Cancel

F1::
msgbox, 3,title,hello_옵션3,5
    ifmsgbox, yes
        msgbox, YES를 누름 
    ifmsgbox, no
        msgbox, NO를 누름
    ifmsgbox, cancel
        msgbox, Cancel을 누름
return

 

메시지 옵션 4 조건문

- YES, NO

F2::
msgbox, 4,title,hello_옵션4,10
    ifmsgbox, yes
        msgbox, YES를 누름
    ifmsgbox, no
        msgbox, NO를 누름
return

 

 

메시지 Timeout

F3::
msgbox, 4,제목,내용,5
    ifmsgbox, timeout
    {
        ;msgbox 5초 타임아웃

        msgbox, ,,5초 타임아웃,3

     ;버튼 클릭안하고 5초 타임아웃이되면 해단 메시지 실행
    }
    else ifmsgbox, yes
        msgbox, YES를 누름
    else ifmsgbox, no
        msgbox, NO를 누름 
return

 

 

728x90
반응형
Comments