mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Jun 2004
Posts: 10
U
Uradox Offline OP
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2004
Posts: 10
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

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$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
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jun 2004
Posts: 10
U
Uradox Offline OP
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2004
Posts: 10
/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

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
/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).


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jun 2004
Posts: 10
U
Uradox Offline OP
Pikka bird
OP Offline
Pikka bird
U
Joined: Jun 2004
Posts: 10
Thanks worked fine!! smile


Link Copied to Clipboard