I came up with this idea to make it easier to send scripts over mIRC. If you paste a script into a channel or query, the person has to remove <Blake> from the beginning of every line, so I'd like to be able to have this dialog for sending scripts. Both people would have to have this script, but what it would do would be to put the sent script into a @window to make it easier to copy. I'm having problems with this though, and I can't figure where all the problems are. In my status window, it's doing a few things. It looks like it's trying to send a notice to someone named Send with the text Script, and I'm also getting "* /ctcp: insufficient parameters (line 19, scriptsend.mrc)". Line 19 is:

ctcp $snick(#,%x) endscript

Here's what I have so far:
Code:
dialog scriptsend {
  title "Script Sender"
  size -1 -1 428 470
  option pixels notheme
  edit "", 1, 4 9 419 316,multiline, vsbar
  button "Send Script", 2, 4 332 65 25
}
On *:Dialog:scriptsend:sclick:2: {
  var %x = 1
  while (%x &lt;= $snick(#,0)) {
    ctcp $snick(#,%x) script
    inc %x
  }      
  var %y = 1
  while %y &lt;= $did(scriptsend,1).lines {
    msg $snick(#,%x) $did(scriptsend,1,%y).text
    inc %y
  }      
  ctcp $snick(#,%x) endscript
}
ctcp ^*:scriptsend: {
  haltdef  
  set %script 1
  if ($window(script)) {
    aline @script $crlf
  }
  else {
    window @script
  }
}
ctcp ^*:endscript: {
  haltdef
  unset %script
}
on *:text:*:*:{
  if (%script) {
    aline @script $1-
  }
}

Thanks for any help.

OK, I fixed the problem with it sending to the wrong nick. I'm still having a problem though. I need to have it remember every selected nick so it can send the script to them, and right now, it's saying:

dialog No such nick/channel
-
title No such nick/channel

etc. How would I save the nicks since I have to get out of that loop to send the script?