mIRC Homepage
Posted By: Fantas multiselect nicks in a dialog - 12/09/07 02:47 PM
i've tried multsel and extcel and they will highlight them but what i want to do is for it to send a message to all selected
on *:dialog:user.list:sclick:4: {
msg $did(2).seltext $$?="message?*"*
}

thanks
Posted By: SladeKraven Re: multiselect nicks in a dialog - 12/09/07 03:19 PM
Code:
on *:dialog:user.list:sclick:4: { 
  var %x = 1
  while (%x <= $did($dname,2,0).sel) { 
    msg $did($dname,2,%x).seltext $$?="message"
    inc %x
  }
}
Posted By: Fantas Re: multiselect nicks in a dialog - 12/09/07 08:28 PM
i'm afraid all that does is message same nick several times
Posted By: Lpfix5 Re: multiselect nicks in a dialog - 12/09/07 09:40 PM
Originally Posted By: SladeKraven
Code:
on *:dialog:user.list:sclick:4: { 
  var %x = 1
  while (%x <= $did($dname,2).lines) { 
    msg $did($dname,2,%x).text $$?="message"
    inc %x
  }
}


Here you go made changes into the quote His method would require you to have a multi selection selected in your editbox which would require your dialog input to have extsel added ex:.

list 2, xyhw, size extsel

see the extsel? this will allow you to click or a nick press shift and select the nick at the bottom to select all nicks, then his script would work

else without selecting anyone, the re-write I did would message all users.
Posted By: Fantas Re: multiselect nicks in a dialog - 12/09/07 10:08 PM
that's closer but i didn't want to message all nicks just one's highlighted
Posted By: RusselB Re: multiselect nicks in a dialog - 12/09/07 10:52 PM
Code:
on *:dialog:user.list:sclick:4: { 
  var %x = 1
  while (%x <= $did(2,0).seltext) { 
    msg $did(2,%x).seltext $$?="message"
    inc %x
  }
}
Posted By: Lpfix5 Re: multiselect nicks in a dialog - 13/09/07 01:57 AM
Originally Posted By: Fantas
that's closer but i didn't want to message all nicks just one's highlighted


Ya i noted that it was gonna do that lol :P
Posted By: Fantas Re: multiselect nicks in a dialog - 13/09/07 02:41 PM
none of these actually do what i want thanks anyways
Posted By: SladeKraven Re: multiselect nicks in a dialog - 13/09/07 03:10 PM
Code:
dialog user.list {
  size -1 -1 110 110
  option dbu
  list  2, 5 5 100 90, multsel extsel
  button "Send Message",4, 40 95 40 10
}

On *:Dialog:user.list:init:*: {
  didtok $dname 2 32 Adam Bob Chris Dave Evan Fred Gary Henry
}

On *:Dialog:user.list:sclick:4: {
  if ($did($dname,2,0).sel) {
    var %x = 1, %msg = $$?="message?"
    while (%x <= $did($dname,2,0).sel) { 
      msg $did($dname,2,$did($dname,2,%x).sel) %msg
      inc %x
    }
  }
}


I've added a dialog to show you it works. Just open up the dialog and select some nicks and then send the message.
Posted By: deegee Re: multiselect nicks in a dialog - 13/09/07 03:17 PM
Code:
on *:dialog:user.list:sclick:4: { 
  var %i = 1,%a = $iif($did(2,0).sel,$$?="message")
  while $did(2,%i).sel { 
    msg $did(2,$v1) %a
    inc %i
  }
}
Posted By: Fantas Re: multiselect nicks in a dialog - 13/09/07 03:45 PM
those last 2 work great. Thanks Guys
© mIRC Discussion Forums