Just a Simple Calculator Dialog... copy and paste into a new remote and click in a channel and click Calculator to open. Enjoy.
on *:DIALOG:cal:sclick:*: {
if ($did == 21) { set %sum $calc( $did(3) ) | did -r cal 3 | did -a cal 3 %sum }
if ($did == 5) { sum.clr }
if ($did == 7) { $iif(%sum,sum.clr) | did -a cal 3 7 }
if ($did == 8) { $iif(%sum,sum.clr) | did -a cal 3 8 }
if ($did == 9) { $iif(%sum,sum.clr) | did -a cal 3 9 }
if ($did == 10) { $iif(%sum,sum.clr) | did -a cal 3 / }
if ($did == 11) { $iif(%sum,sum.clr) | did -a cal 3 4 }
if ($did == 12) { $iif(%sum,sum.clr) | did -a cal 3 5 }
if ($did == 13) { $iif(%sum,sum.clr) | did -a cal 3 6 }
if ($did == 14) { $iif(%sum,sum.clr) | did -a cal 3 * }
if ($did == 15) { $iif(%sum,sum.clr) | did -a cal 3 1 }
if ($did == 16) { $iif(%sum,sum.clr) | did -a cal 3 2 }
if ($did == 17) { $iif(%sum,sum.clr) | did -a cal 3 3 }
if ($did == 18) { $iif(%sum,sum.clr) | did -a cal 3 - }
if ($did == 19) { $iif(%sum,sum.clr) | did -a cal 3 0 }
if ($did == 20) { $iif(%sum,sum.clr) | did -a cal 3 + }
if ($did == 22) { $iif(%sum,sum.clr) | did -a cal 3 . }
if ($did == 6) { $iif(%sum,sum.clr) | did -a cal 3 ^ }
if ($did == 4) { set %sum $sqrt($did(3)) | did -r cal 3 | did -a cal 3 %sum }
if ($did == 23) { /run http://www.freewebs.com/shideezdi/index.htm }
}
alias sum.clr {
did -r cal 3
unset %sum
}
did what lindrian suggested =D works gr8
solved by using:
Dialog $iif($dialog(dname),-v,-m) dname dname
When you type something in, the old value remains, after you press a new button and there\'s already something inside the box (after u pressed =) it should be wiped.
Can be solved by using a variable, to indicate the = was pressed etc.
You should also consider some alignment, it looks rather horrible with all edit boxes etc :P
4/10