mIRC Home    About    Download    Register    News    Help

Print Thread
#100999 19/10/04 10:15 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
Hi all.

How can i find a specific word in a line, take out the word next to it and.. write it down in a file.
This is what i got at the moment:

on *:text:*:#: {
if (theword isin $1-) { write $mircdirtxtfiles\word.txt $1- }
}

This however just writes the word wich was isin the line and not the word i need: for example: theword WORD
i need the WORD to write down.
The WORD is a unknown word so i cannot use the isin for that.

Greetz
Aaron


Deridio fatum
#101000 19/10/04 10:51 AM
Joined: May 2004
Posts: 95
W
Babel fish
Offline
Babel fish
W
Joined: May 2004
Posts: 95
there are probably better ways to do this, but i made this of it:
Code:
$ [ $+ [ $calc($findtok($1-,theword,1,32) +1) ] ]

#101001 19/10/04 11:35 AM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Code:
On *:TEXT:*:#: {
If ($Istok($1-,theword,32) == $True) { write txtfiles\word.txt $($+($,$Calc($Findtok($1-,theword,1,32) + 1)),2) }
}


- Relinsquish
#101002 19/10/04 12:22 PM
Joined: Feb 2004
Posts: 2,019
Hoopy frood
Offline
Hoopy frood
Joined: Feb 2004
Posts: 2,019
No need for the eval.
Code:

on *:TEXT:*:#: if $findtok($$1-,theword,1,32) { write txtfiles\word.txt $gettok($1-,$calc($v1 + 1),32) }



Gone.
#101003 19/10/04 07:57 PM
Joined: Mar 2004
Posts: 175
Vogon poet
Offline
Vogon poet
Joined: Mar 2004
Posts: 175
Eval and Gettok do the same thing in this situation. cool


- Relinsquish
#101004 20/10/04 05:19 AM
Joined: Jan 2004
Posts: 129
A
AaronL Offline OP
Vogon poet
OP Offline
Vogon poet
A
Joined: Jan 2004
Posts: 129
hi FiberOptics and Relinsquish.

These routine you gave me works awesome. thanks

Greetz
Aaron


Deridio fatum

Link Copied to Clipboard