Sub Globals
Dim Dialog As JavaObject
End Sub
Sub OpenMsgbox
Dialog = xui.Msgbox2Async("Question?", "Title", "Yes", "Cancel", "No", Null)
CloseAfter5Seconds
Wait For Msgbox_Result (Result As Int)
Dialog = Null
If Result = xui.DialogResponse_POSITIVE Then
Log("yes")
Else If Result = xui.DialogResponse_Cancel Then
Log("cancel")
Else If Result = xui.DialogResponse_Negative Then
Log("no")
End If
End Sub
Sub CloseAfter5Seconds
Sleep(5000)
If Dialog.IsInitialized Then
' Dialog.RunMethod("hide", Null)
Dialog.RunMethod("close", Null)
End If
End Sub