mIRC Homepage
Posted By: harl91 variables in txt dialog - 29/05/07 12:33 AM
Code:
dialog dns {

  title "DNS/IP"
  size 300 200 95 50
  option dbu

  text "Enter IP (default is %bot.ip)" , 1, 10 10 75 7
  edit "", 2, 10 17 75 10
  button "Enter", 3, 10 27 75 10

}


how do i get %bot.ip to be treated like a variable and not real txt?
Posted By: hixxy Re: variables in txt dialog - 29/05/07 12:43 AM
Change the text in the dialog's init event:

Code:
dialog dns {

  title "DNS/IP"
  size 300 200 95 50
  option dbu

  text "" , 1, 10 10 75 7
  edit "", 2, 10 17 75 10
  button "Enter", 3, 10 27 75 10

}
on *:dialog:dns:init:*:{ did -a dns 1 Enter IP (default is %bot.ip $+ ) }
Posted By: Riamus2 Re: variables in txt dialog - 29/05/07 02:15 AM
Or, just remove the quotes around the text. The danger of that is a comma (and perhaps other characters) cannot be displayed without quotes. If you know you won't have commas or any other characters that may cause it to not work, then you don't need to worry about it.

Code:
text Enter IP (default is %bot.ip $+ ) , 1, 10 10 75 7
© mIRC Discussion Forums