mIRC Home    About    Download    Register    News    Help

Print Thread
Multi Line DLL return support #88662 30/06/04 01:32 PM
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

Re: Multi Line DLL return support #88663 30/06/04 02:27 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
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.
Re: Multi Line DLL return support #88664 30/06/04 09:31 PM
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

Re: Multi Line DLL return support #88665 30/06/04 09:56 PM
Joined: Dec 2002
Posts: 2,962
S
starbucks_mafia Offline
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.
Re: Multi Line DLL return support #88666 04/07/04 03:20 PM
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