dialog dxaway {
size -1 -1 425 85
icon 01/DX007.ico
title Away System
text "Away Message:"1, 5 10 90 15
edit ""2, 95 5 240 23,autohs
check "Away"3, 340 5 80 23,push
check "Ignore messages while away"4, 15 35 185 15
check "Notify channels when I go away"5, 205 35 200 15
button "Close"6, 155 55 80 23,ok
}
on *:DIALOG:dxaway:init:*: {
if ($awaymsg != $null) { did -a dxaway 2 $awaymsg }
if ($away == $true) {
did -c dxaway 3
did -r dxaway 3
did -a dxaway 3 Cancel Away
did -a dxaway $awaymsg
}
if ($dxaway(-a) == on) { did -c dxaway 4 }
if ($dxaway(-b) == on) { did -c dxaway 5 }
}
on *:DIALOG:dxaway:sclick:*: {
if ($did == 3) {
if ($did(3).state == 1) {
if ($did(2).text == $null) { away 12*!*14 DeluXe Away System 12*!*4 $me is currently away. }
else { away 12*!*14 DeluXe Away System 12*!*4 $did(2).text }
if ($dxaway(-b) == on) { if ($did(2).text == $null) { ame 12*!*14 DeluXe Away System 12*!*4 $me is currently away. }
else { ame 12*!*14 DeluXe Away System 12*!*4 $me is away: $did(2).text }
}
did -r dxaway 3
did -a dxaway 3 Cancel Away
}
elseif ($did(3).state != 1) { if ($dxaway(-b) == on) { amsg 12*!*14 DeluXe Away System 12*!*4 $me is no longer away. Was away for $duration($awaytime) }
away
did -r dxaway 3
did -a dxaway 3 Away
if (%dx.msg != $null) { dialog -m dxawm dxawm }
}
}
if ($did == 4) { if ($did(4).state == 1) { dxaway -a on } | else { dxaway -a off } }
if ($did == 5) { if ($did(5).state == 1) { dxaway -b on } | else { dxaway -b off } }
}