mIRC Homepage
Posted By: Uradox Multi Line DLL return support - 30/06/04 01:32 PM
Wondering if it would be possible to allow ascii data returned from a $dll call to be multiline.
Like some text that has a few lines each with carrage return at the end (0Ah 0Dh) and then more and so on and so on. So my return will (in my case) send a few lines of stuff to the channel.
Thanks
Posted By: starbucks_mafia Re: Multi Line DLL return support - 30/06/04 02:27 PM
$dll can already return text containing multiple lines, however they cannot be sent all at once by /msg, /say, or any other output command.

Prseumably your current code is something like this:
Code:
msg #channel $dll(somedll.dll, Command, parms)


All you have to do is change it to:
Code:
var %dllvalue = $replace($dll(somedll.dll, Command, parms),$crlf,$lf)
var %i = 1, %t = $numtok(%dllvalue, 10)
while %i <= %t {
  msg #channel $gettok(%dllvalue, %i, 10)
  inc %i
}
Posted By: Uradox Re: Multi Line DLL return support - 30/06/04 09:31 PM
/patch {
var %dllvalue = $replace($dll(test.dll, GetPatches, 0),$crlf,$lf)var %i = 1, %t = $numtok(%dllvalue, 10)while %i <= %t { msg #lcd $gettok(%dllvalue, %i, 10) inc %i}
}

And to use i would /patch ... have i done this correctly? i dont seem to get any output
Posted By: starbucks_mafia Re: Multi Line DLL return support - 30/06/04 09:56 PM
/patch {
var %dllvalue = $replace($dll(test.dll, GetPatches, 0),$crlf,$lf)
var %i = 1, %t = $numtok(%dllvalue, 10)
while %i <= %t {
msg #lcd $gettok(%dllvalue, %i, 10)
inc %i
}
}

That should work. The problem was that it was all on one line (it's a problem with copy-pasting code in Internet Exlorer).
Posted By: Uradox Re: Multi Line DLL return support - 04/07/04 03:20 PM
Thanks worked fine!! smile
© mIRC Discussion Forums