#DefineFunction udfWSHMessage(Timeout,TitleText,MessageText,DisplayFlags) ;-------------------
oWSHShell = ObjectCreate("WScript.Shell")
Ret = oWSHShell.popup(MessageText,Timeout,TitleText,DisplayFlags)
oWSHShell = 0
Return(Ret)
;EXAMPLES:
;Test1 = udfWSHMessage(5,"Test 1","5 second timeout with STOP icon and OK button.",16)
;Test2 = udfWSHMessage(7,"Test 2","7 second timeout with QUESTION MARK icon and OK and CANCEL buttons.",32|1)
;Test3 = udfWSHMessage(8,"Test 3","8 second timeout with EXCLAMATION icon and ABORT RETRY IGNORE buttons. IGNORE has been made the DEFAULT option.",48|2|512)
;Test4 = udfWSHMessage(4,"Test 4","4 second timeout with NO icon and just an OK button.",0)
;0==OK, 1==OK|Cancel, 2==Abort|Retry|Ignore, 4==Yes|No, 8==nothing, 16==RedX, 32==?mark, 64==info, 128==blank spot, 256==noIcon
;timeout= -1, OK==1, Cancel==2, abort==3, retry==4, yes==6, no==7
#EndFunction ;udfWSHMessage ------------------------------------------------------------------
Test2 = udfWSHMessage(7,"My Dlg Title","7 second timeout with QUESTION MARK icon and OK and CANCEL buttons.",32|1)
Test2 = udfWSHMessage(7,"My Dlg Title","7 second timeout with QUESTION MARK icon and OK and CANCEL buttons.",32|1)
winPlace(50,50,100,300,`My Dlg Title`)
_killMe = udfMoveAlarmToMon2(_almTitle) ;only moves alarm if _zoomActive and _numMons > 1 (both defined inside udf)
_udfMsgTitle = _almTitle
_udfMsgText = _alarmMsg
_udfMsgJust = `Center`
_udfTimeOut = 8
_udfButtons = `OK|Remind 5m|Remind 15m|Remind 30m|Msg2ClipBd|Reschedule|Cancel`
_udfPositon = `0,0,1000,1000`
_almUserClick = udfMessage(_udfMsgTitle,_udfMsgText,_udfMsgJust,_udfTimeout,_udfButtons,_udfPositon)
if _killMe != 0 then fileDelete( dirScript() : _killMe : `.wbt` )
#DEFINEFUNCTION udfMoveAlarmToMon2(_almTitle) ;---------------------------------------
debugTrace(22)
_numMons = winMetrics(80)
_zoomActive = winExist(`ConfMeetingNotfiyWnd`)
IF _numMons > 1 && _zoomActive
;debugTrace(22)
_dtCode = timeFormat(timeYmdHms(), `yyMMdd_hhmmss`)
_f = `_st = timeYmdHms()` : @CRLF : `while 1` : @CRLF : `if winExist('%_almTitle%')` : @CRLF : `_pp = arrayize(winPosition('%_almTitle%'), ",")` : @CRLF : `_tx = _pp[0] - 1000` : @CRLF : `_bx = _pp[2] - 1000` : @CRLF : `winPlace( _tx, _pp[1], _bx, _pp[3], '%_almTitle%' )` : @CRLF : `return` : @CRLF : `endif` : @CRLF : `yields(250)` : @CRLF : `if timeDiffSecs(timeYmdHms(), _st) > 20 then Break` : @CRLF : `endwhile`
filePut(dirScript() : _dtCode : `.wbt`, _f)
yields(20)
run(dirScript() : _dtCode : `.wbt`, ``)
return _dtCode
ENDIF
return 0
#ENDFUNCTION ;udfMoveAlarmToMon2() ---------------------------------------------------