mIRC Home    About    Download    Register    News    Help

Topic Options
#239764 - 21/11/12 01:05 AM [REQUEST] log username
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
Does anyone has a script to log 1 username instead to search in the .log?

Something like when i use /log LisaMIRC, that the script will just log my text, in file "C:/..../mIRC/log.txt"

Top
#239768 - 21/11/12 11:19 AM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
From the help file.

/log <on|off> <window> [-f filename]

Turns logging on and off for a window, if you specify a filename the logs file dialog is not popped up.

So you can use -> /log on LisaMIRC -f c:\LisaMIRC.txt

Untested but give it a try.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239774 - 21/11/12 03:26 PM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
Well, it says * Loging from LisaMIRC 'logs\test.log' when i use /log on LisaMIRC -f logs/test.log
But it don't save anything in de file.


Edited by LisaMIRC (21/11/12 03:27 PM)

Top
#239778 - 21/11/12 06:46 PM Re: [REQUEST] log username [Re: LisaMIRC]
Riamus2 Offline
Planetary brain

Registered: 13/10/04
Posts: 8327
Loc: NC, USA
sparta misunderstood. That would work for a specific window, but would not log a specific user's text. For that, you'd need a script. I don't have time to write one up for you, but it would just be an on text and on input event that checks if $nick == whatever, then /write $1- to a file.
_________________________
Invision Support
#Invision on irc.irchighway.net

Top
#239782 - 21/11/12 07:23 PM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Code:
on *:text:*:*: { if ($nick == Change-to-nick-here) { write testing.txt $1-  } }

Goes to remote, ALT + R in your mirc.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239791 - 22/11/12 03:57 AM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
Thank you a lot, sparta.
This works fine. Is it possible to set a line before the copied text? Something like
Code:
<pre> texttexttext </pre> or <br> texttexttext </br> 
save it like that in the file.

And is there a way to capture 1 word in a line, bv the second word, or the fifth word.

Top
#239793 - 22/11/12 09:06 AM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
write testing.txt $1-

Replace with
write testing.txt <add new text here> $1- <and also here>

use $1, $2, $3 to get the words you looking for.
Code:
on *:text:*:*: { if ($nick == Change-to-nick-here) { write testing.txt $1- | echo -a $2 is the second word in the line  } }
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239799 - 22/11/12 03:19 PM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
Wen i use this

on *:text:*->*:*: { if ($nick == The-Nickname) { write testing1.txt .timermsg 1 $rand(1,4) /msg $chan $9 }
}
}

In red is extra added


than it doesnt copy $rand in the file, how do i need to do that?


Edited by LisaMIRC (22/11/12 03:37 PM)

Top
#239800 - 22/11/12 07:35 PM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Missing a pipe.

on *:text:*->*:*: { if ($nick == The-Nickname) { write testing1.txt | .timermsg 1 $rand(1,4) /msg $chan $9 } }

And i dont understand what you want to do with the $rand(), $9 is empty if the line arent long enough.

The($1) lines($2) we($3) looking($4) at($5) just($6) to($7) show.($8) here($9)

So if the message you snatch from the channel are shorter then 9 words $9 will be null.

To show all the messages you use $1-
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239810 - 23/11/12 10:58 PM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
i tried that but it doesn't set &rand, $chan and the } at the end

Code:
on *:text:*->*:*: { if ($nick == The-Nickname) { write testing1.txt | .timermsg 1 $rand(1,4) /msg $chan $9 }
   }
}


It add it like this

Code:
.timermsg 1 3 /msg #Name-OfChannel "the word"


I don't want him to get me the channel name, i want him to put /msg $chan in the file.


Edited by LisaMIRC (23/11/12 11:10 PM)

Top
#239852 - 26/11/12 05:13 AM Re: [REQUEST] log username [Re: LisaMIRC]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
Anyone?

Top
#239853 - 26/11/12 09:09 AM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Code:
on *:text:*->*:*: { if ($nick == The-Nickname) { write testing1.txt | set %log-chan $chan | .timermsg 1 $rand(1,4) /msg %log-chan $9 | unset %log-chan } }

_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239854 - 26/11/12 05:19 PM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
It dont write it in testing1.txt it write it directly in the channel.

when i use
Code:
on *:text:*->*:*: { if ($nick == The-Nickname) { write testing1.txt | set %log-chan $chan | .timermsg 1 $rand(1,4) /msg %log-chan $9 | unset %log-chan } }

Top
#239859 - 27/11/12 09:03 AM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
write testing.txt $1-

You missing one part of the text.
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239904 - 03/12/12 02:22 AM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
Nope, not working. tried it like that but it most be more like this.

Code:
on *:text:*->*:*: { if ($nick == NickName) { set %log-chan $chan %rand $rand(1,4) | write testing1.txt .timermsg %rand /msg %log-chan $9 | unset %log-chan %rand} }


But a working script. I tried to mix it up but didnt come up with a succes.

Other suggest?


Edited by LisaMIRC (03/12/12 02:22 AM)

Top
#239905 - 03/12/12 02:40 AM Re: [REQUEST] log username [Re: LisaMIRC]
Deega Offline
Vogon poet

Registered: 30/10/12
Posts: 164
Code:
on *:text:*->*:*:{
  if ($nick == NickName) {
    write testing1.txt .timermsg 1 $!rand(1,4) /msg $!chan $$9
  }
}

Top
#239920 - 04/12/12 10:18 PM Re: [REQUEST] log username [Re: Deega]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
TYY this works just how i want it TY.

Is there a way to add the } after $$9 at the end. If i add it it sees it like a end of string

Code:
on *:text:*->*:*: { 
if ($nick == NickName) { 
write Trivia.txt .timermsg 1 $!rand(2,5) /msg $!chan $$9 "}" 
    }
}


Edited by LisaMIRC (04/12/12 10:22 PM)

Top
#239921 - 04/12/12 10:26 PM Re: [REQUEST] log username [Re: LisaMIRC]
sparta Offline
Planetary brain

Registered: 22/02/03
Posts: 3432
Loc: Sweden/Borlänge
Maybe you can replace it with $chr(125) , this is the ascii value for }
_________________________
if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }

Top
#239922 - 05/12/12 04:49 AM Re: [REQUEST] log username [Re: sparta]
LisaMIRC Offline
Pikka bird

Registered: 21/11/12
Posts: 19
YESSS FINALLY THANK YOU ALL FOR THE HELP

Code:
ON *:TEXT:*->*:*: {
 if ($nick == NickName) {
 write testing1.txt .timermsg 1 $!rand(2,5) /msg $!chan $$9 $chr(125)
  }
}

Works like how i want it. THANKS AGAIN


Edited by LisaMIRC (05/12/12 04:50 AM)

Top