메세지박스를 동기식으로 로드하는 API이다.
Parameters | Type | Description |
---|---|---|
strMsg | STRING | 메세지 내용 |
strTitle | STRING | 메세지박스의 제목 |
nBoxStyle | short | 박스 스타일 |
nButtonType | short | 버튼 스타일 |
nFocusButton | short | 포커스 받을 버튼 [옵션] |
strMessageBoxId | STRING | 메세지 박스 ID [옵션] |
nXPos | short | [옵션] 메시지박스 수평 표시 위치 (기본값: -1) |
nYPos | short | [옵션] 메시지박스 수직 표시 위치 (기본값: -1) |
Type | Description |
---|---|
short | 선택한 메시지 박스 버튼값 (화면 on_messagebox 이벤트 도움말 참조) |
async/await 문법을 사용하여 messagebox를 동기 방식으로 처리하는 함수이며, IE 브라우저는 지원하지 않는다.
messageboxsync API 호출시 "on_messagebox" 이벤트는 발생하지 않는다.
파라미터에 대한 자세한 설명은 messagebox API 도움말을 참조한다.
// 동기식 메시지박스 표시 버튼 이벤트 처리,
// messageboxsync API를 await 방식으로 호출하기 위해, 함수 이름 앞에 "async" 키워드를 추가로 붙어야 한다.
async function btn_messagebox_sync_on_mouseup(objInst)
{
factory.consoleprint("btn_messagebox_sync_on_mouseup> start");
factory.consoleprint("btn_messagebox_sync_on_mouseup> before call messageboxsync");
// messageboxsync API 호출시 "on_messagebox" 이벤트가 발생하지 않는다.
// messageboxsync API 함수 호출의 리턴값을 통해서 사용자가 선택한 값을 구한다.
// await의 동기화 처리는 async 함수내에서만 수행된다.
var result = await screen.messageboxsync("어떤내용을 선택하시겠습니까?", "선택",
XFD_MB_QUESTION, XFD_MB_YESNOCANCEL, XFD_MB_FOCUSBUTTON1);
factory.consoleprint("btn_messagebox_sync_on_mouseup> after call messageboxsync");
screen.alert("btn_messagebox_sync_on_mouseup> result = " + result);
factory.consoleprint("btn_messagebox_sync_on_mouseup> end");
}