mIRC Home    About    Download    Register    News    Help

Print Thread
#196494 17/03/08 10:12 PM
Joined: Mar 2003
Posts: 27
Z
zorin Offline OP
Ameglian cow
OP Offline
Ameglian cow
Z
Joined: Mar 2003
Posts: 27
Here is the code :P
Code:
dialog testing {
  title "New Project"
  size -1 -1 115 70
  option dbu
  edit "", 1, 1 47 113 10, return jj
  button "NRK1", 2, 1 1 37 12
  button "NRK2", 3, 1 14 37 12
  button "NRK3", 4, 1 27 37 12
  button "TV2", 5, 39 1 37 12
  button "TV2 Zebra", 6, 39 14 37 12
  button "TVNORGE", 7, 77 27 37 12
  button "TV3", 8, 77 1 37 12
  button "FEM", 9, 77 14 37 12
  button "TV2 Film", 10, 39 27 37 12
  text "Custom:", 11, 1 39 25 8
  button "Cancel", 13, 58 58 56 12, cancel
  button "Ok", 12, 1 58 56 12, ok
}
on *:dialog:testing:edit:*: { echo $1 }

on *:dialog:testing:sclick:*:{ 
  if ($did == 2) { echo %channel 195.1.1.60:5500 } 
  if ($did == 3) { var %channel 195.1.1.30:5500 } 
  if ($did == 4) { var %channel 195.1.1.50:5500 } 
  if ($did == 5) { var %channel 195.1.1.35:5500 } 
  if ($did == 6) { var %channel 195.1.1.80:5500 } 
  if ($did == 7) { var %channel 195.1.1.31:5500 }
  if ($did == 8) { var %channel 195.1.2.100:5500 }
  if ($did == 9) { var %channel 195.1.2.20:5500 }
}


Now, if i want to write something in the "edit" field, instead of selecting one of the buttons, how can i copy that into a var or something?

Joined: Aug 2004
Posts: 7,252
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
From the help file under /dialog
Quote:
Variables
If you specify a %variable name in a dialog item definition, the %variable will be set with the contents of that item when the dialog is closed.
Code:
edit "", 2, 10 10 100 20, autohs %result


Link Copied to Clipboard