My First Dialog

By F R E E Z E on Jul 22, 2007

I wanted to make a dialog just to understand how it works so here it is. Yes, I know its not very good but oh well =\

To use right click anywhere on your mIRC Screen and click "Calculator" or type /calculator

menu * { 
  .Calculator { calculator } 
} 
alias calculator { 
  /dialog -m calc calc 
} 
dialog calc { 
  title "Calculator" 
  size -1 -1 105 78 
  option dbu 
  text "Made by Freeze" 1, 27 65 60 10 
  box "Calculator", 2, 1 1 103 76 
  edit "", 3, 18 11 56 13 
  text "Sum:", 4, 4 12 15 90, center 
  button "Ok", 5, 5 49 37 12 
  button "Cancel", 6, 64 49 37 12, Cancel 
} 
on *:dialog:calc:sclick:5:{ 
  //echo -a The answer to your sum is: $calc( $did(3) ) 
} 

Comments

Sign in to comment.
guest598594   -  Sep 24, 2007

well good job for ur first, but instead of echoing, put a text box under it to post the answer (did -a name id $calc...) and also, its not just sum you can do, u can do +-*/

 Respond  
ZabuzaMomochi   -  Jul 24, 2007

I would prefer my calculator over this, but good job for your first dialog.

 Respond  
napa182   -  Jul 22, 2007

if you dont mind i used your calc and added this to it..

menu menubar,channel,status { 
  .Calc:c 
} 
alias c dialog $iif($dialog(c),-v,-md c) c 
dialog c { 
  title "Calculator" 
  size -1 -1 105 100 
  option dbu 
  text "Made by Freeze" 1, 58 45 60 10 
  box "Calculator", 2, 1 1 103 97 
  edit "", 3, 18 11 78 10 
  text "Calc:", 5, 4 12 15 90, center 
  button "Exit", 7, 64 87 35 10, Cancel
  button "Clear", 8, 20 29 20 10, edit
  button "7", 9, 9 45 10 10
  button "8", 10, 20 45 10 10
  button "9", 11, 31 45 10 10
  button "/", 12, 42 45 10 10
  button "4", 13, 9 55 10 10
  button "5", 14, 20 55 10 10
  button "6", 15, 31 55 10 10
  button "*", 16, 42 55 10 10
  button "1", 17, 9 65 10 10
  button "2", 18, 20 65 10 10
  button "3", 19, 31 65 10 10
  button "-", 20, 42 65 10 10
  button "0", 21, 9 75 10 10
  button "+", 22, 42 75 10 10
  box "", 23, 5 38 50 50
  button ".", 25, 20 75 10 10
  button "=", 26, 31 75 10 10
} 
on *:DIALOG:c:sclick:26:{ set %huh $calc( $did(3) ) | did -r c 3 | did -a c 3 %huh } 
on *:dialog:c:sclick:8:{ did -r c 3 | unset %huh }
on *:DIALOG:c:sclick:9:{ did -a c 3 7 }
on *:DIALOG:c:sclick:10:{ did -a c 3 8 }
on *:DIALOG:c:sclick:11:{ did -a c 3 9 }
on *:DIALOG:c:sclick:12:{ did -a c 3 / }
on *:DIALOG:c:sclick:13:{ did -a c 3 4 }
on *:DIALOG:c:sclick:14:{ did -a c 3 5 }
on *:DIALOG:c:sclick:15:{ did -a c 3 6 }
on *:DIALOG:c:sclick:16:{ did -a c 3 * }
on *:DIALOG:c:sclick:17:{ did -a c 3 1 }
on *:DIALOG:c:sclick:18:{ did -a c 3 2 }
on *:DIALOG:c:sclick:19:{ did -a c 3 3 }
on *:DIALOG:c:sclick:20:{ did -a c 3 - }
on *:DIALOG:c:sclick:21:{ did -a c 3 0 }
on *:DIALOG:c:sclick:22:{ did -a c 3 + }
on *:DIALOG:c:sclick:25:{ did -a c 3 . }
 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.