mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Sep 2007
Posts: 14
D
Diam0nd Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Sep 2007
Posts: 14
Guys, I'm trying to put together a simple script together that would store a certain text from any channel as soon as it's said. Let me illustrate. As a solution for the time-being, I set a Highlight for SOME-SAMPLE-TEXT. So, as soon as there's SOME-SAMPLE-TEXT, it gets highlighted, e.g. here's an example of my typical string:
Code:
[16.05.13][21:15:22] <Nick> SOME-SAMPLE-TEXT

...and whole string gets highlighted now.

Is there a way to store this WHOLE exact string in a text file AND do this every time this highlight event happens. BUT do so continuously, meaning ADDING to this text file string after string (as opposed to storing just one last event).

I'm not sure I'm explaining myself correctly, since I don't know that much about this kind of stuff, so please do pardon me in advance. But in any case, any ideas guys? I would be very thankful for ANY pointers on the subject : )))

Last edited by Diam0nd; 23/05/13 08:10 PM.

mIRC v7.32 REGISTERED
Plain, no scripts
Joined: Oct 2012
Posts: 164
D
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Code:
on *:text:*SOME-SAMPLE-TEXT*:#:{
  write FILENAME.txt $time([dd.mm.yy][HH.nn.ss]) $+(<,$nick,>) $1-
}

/help on text
/help /write
/help $time
/help Other Identifiers


Joined: Sep 2007
Posts: 14
D
Diam0nd Offline OP
Pikka bird
OP Offline
Pikka bird
D
Joined: Sep 2007
Posts: 14
Originally Posted By: Deega
Code:
on *:text:*SOME-SAMPLE-TEXT*:#:{
  write FILENAME.txt $time([dd.mm.yy][HH.nn.ss]) $+(<,$nick,>) $1-
}

/help on text
/help /write
/help $time
/help Other Identifiers


Thanks so much for your kind reply and this lovely sample! I'm starting to get the hang of this thing laugh
A few questions:
- Isn't it possible to simply capture the whole string where a keyword (SOME-SAMPLE-TEXT in this case) was found? Instead of manually putting it together (timestamp, nick, message)
- Is it possible to strip ALL formatting from the text (make it plain text)? Because in my case it comes in with formatting, which makes it nearly impossible to read/use later DONE VIA APPLYING $strip() TO $1- thus giving $strip($1-)
- Is it possible to monitor for the event (SOME-SAMPLE-TEXT) from particular nickname or several nicknames?

Again, thanks so very much in advance! And I really AM reading the help in the meantime, but it's not too easy getting started, so thanks a million for your understanding! laugh

Last edited by Diam0nd; 24/05/13 09:36 PM.

mIRC v7.32 REGISTERED
Plain, no scripts

Link Copied to Clipboard