Jethro commented on a Page, calculator dialog  -  Sep 10, 2011

You can do it with one event like this:

on *:dialog:calc:*:*:{
  if ($devent == sclick) {
    goto $did
    :3 | did -a calc 19 / | halt
    :4 |did -a calc 19 * | halt
    :5 | did -a calc 19 - | halt
    :6 | did -a calc 19 7 | halt
    :7 | did -a calc 19 8 | halt
    :8 | did -a calc 19 9 | halt
    :9 | did -a calc 19 + | halt
    :10 | did -a calc 19 4 | halt
    :11 | did -a calc 19 5 | halt
    :12 | did -a calc 19 6 | halt
    :14 | did -a calc 19 1 | halt
    :15 | did -a calc 19 2 | halt
    :16 | did -a calc 19 3 | halt
    :17 | did -a calc 19 0 | halt
    :18 | did -a calc 19 . | halt
    :22 | did -a calc 19 k | halt
    :23 | did -a calc 19 m | halt
    :24 | did -a calc 19 b | halt
    :20 
    if (!$did(19)) { noop $input(Please specify a calculation in the edit box and click calculate,w,Warning!) }
    else did -a calc 21 $bytes($calc($replace($did(19),k,000,m,000000,b,000000000)),b))
  }
  :error | reseterror
}
 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.