mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Oct 2015
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2015
Posts: 3
Hi, I was wondering if it was possible (and if so, how) to read multiple lines from chat. By this, I mean both or either being able to see text/lines that were previously written or waiting for more messages to be received from the channel and being able to work with that string.

Thank you in advance!

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Well if i understood what you mean.. the only ways i know that would make you able to see previous lines is using a znc which keeps the messages when you're offline and sends you them when you log in. You can find some free bnc services if you search Google for Free bnc.
And the other way is probably not so suitable for you cause it's a channel mode and i only have seen it in inspircd .. +H lines:seconds saves X lines from Y seconds ago.. and when someone joins the channel it sends the lines to them.
Apart from these there's not a way (or at least that's what i know) to be able to see messages that were sent when you weren't on the channel.
smile

Joined: Oct 2015
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2015
Posts: 3
Ah, I didn't mean that. For example, let's say there's an ON Text event and I wanted to see the last X lines before that text event (given that I was in the channel at the time). Or I want to have an ON Text event and get the lines that come after that one.

Essentially, I want to be able to manipulate/use more lines from the channel than just the one that triggers the event.

Joined: Feb 2015
Posts: 243
O
Fjord artisan
Offline
Fjord artisan
O
Joined: Feb 2015
Posts: 243
Oh i'm sorry i didn't get it the 1st time laugh
In that case you could keep the X last lines in a .txt or .ini file.
If you want to keep X lines after a line you should use on text event to recognize that line and then set a variable. So then if the variable exists you save the amount of lines you want.
smile

Joined: Oct 2015
Posts: 3
S
Self-satisified door
OP Offline
Self-satisified door
S
Joined: Oct 2015
Posts: 3
No worries! I worded it pretty poorly.

I don't wanna go with the external route as I/O would be slower than I want this to be, but thanks for the suggestion. Might be useful to think about in some future use case.

I guess using a global variable would be the best way to do this, but it feels wrong to be using global variables like this. I guess that's the limitations of mIRC scripting.

Joined: Nov 2009
Posts: 295
P
Fjord artisan
Offline
Fjord artisan
P
Joined: Nov 2009
Posts: 295
You could use a hash table to store a large buffer of lines.


http://scripting.pball.win
My personal site with some scripts I've released.

Link Copied to Clipboard