|
FMJ
|
FMJ
|
Hi, I'm coding a mirc script... Anyone knows how to save users of a channel on a file .txt? Thanks for help.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
alias savenicks {
var %i = 1
while ( $nick(#,%i) ) {
write nicks.txt $ifmatch
inc %i
}
}
|
|
|
|
FMJ
|
FMJ
|
sorry, but I'm at beginning... how to recall this "alias"?
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
Put it in remotes and type /savenicks in a channel, then open nicks.txt from your mIRC directory.
|
|
|
|
Tsunami
|
Tsunami
|
go to Tools -> Scripts Editor and put it in Remotes, or remove the word "alias" in the first line and put in in Aliases.
|
|
|
|
FMJ
|
FMJ
|
Thanks, it works! but is it possible to do this every time I enter the channel, without write the command "/savenicks"?
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
use a trigger when you join a channel: on $me:JOIN:#:{ savenick } in your remote section..
|
|
|
|
FMJ
|
FMJ
|
sorry, but I don't understand... how to do this trigger?
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
Add this in your remote section.. ALT + R in your mirc..
on $me:JOIN:#:{ savenick }
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
That doesn't work.
on me:*:JOIN:#:{ savenicks }
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
No. Try it. It doesn't work with a $, it does without.
|
|
|
|
FMJ
|
FMJ
|
mmm it doesn't work... but the command "savenicks" must be placed in remote.ini or aliases.ini?
|
|
|
|
FMJ
|
FMJ
|
No, it doesn't works with... on me:*:JOIN:#:{ savenicks } it save only my name...
Last edited by FMJ; 16/11/03 04:19 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
I know why it doesn't work, it is because on JOIN the names list hasn't been recieved yet.. on me:*:JOIN:#:{
set %join $+ # 1
}
raw 366:*:{
if ( $eval(% $+ join $+ $2,2) ) {
savenicks
unset %join $+ $2
}
} It all goes in remotes.
|
|
|
|
FMJ
|
FMJ
|
and if I would do enter the script in a list of channels saved in a file .txt? Exist a FOR cicle? How can I do?
|
|
|
|
FMJ
|
FMJ
|
it doesn't works...
on me:*:JOIN:#:{
set %join $+ # 1
}
raw 366:*:{
if ( $eval(% $+ join $+ $2,2) ) {
savenicks unset %join $+ $2
}
}
Last edited by FMJ; 16/11/03 04:03 PM.
|
|
|
|
Joined: Dec 2002
Posts: 3,015
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 3,015 |
You missed a carriage return after savenicks.
|
|
|
|
FMJ
|
FMJ
|
in the text I put, but doesn't work too
|
|
|
|
FMJ
|
FMJ
|
is not possible to make a pause before to execute command?
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
Yes. use a time.. .timer 1 1 command
|
|
|
|
FMJ
|
FMJ
|
you means .timer 1 1 savenicks ?
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
yes.. on the join command..
|
|
|
|
FMJ
|
FMJ
|
I tried this but nothing... on me:*:JOIN:#:{ .timer 1 1 savenicks }
|
|
|
|
Joined: Mar 2003
Posts: 1,256
Hoopy frood
|
Hoopy frood
Joined: Mar 2003
Posts: 1,256 |
Then your mIRC is screwed. that code is solid.
|
|
|
|
FMJ
|
FMJ
|
I have Mirc 6.03... I need to insert some routine or something? Please, help me!
Last edited by FMJ; 16/11/03 05:07 PM.
|
|
|
|
Tsunami
|
Tsunami
|
We helped you all we could. If the code doesn't work, it's something that you did wrong. Please tell us exactly what you did...
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
make shure you dont have any on join events abow the one with the timer.. mirc takes the first one, then it halts.. so it wont get the one below that one..
|
|
|
|
FMJ
|
FMJ
|
I put
on me:*:JOIN:#:{
.timer 1 1 savenicks
}
on top of remote (ALT-R), then I put after
alias savenicks {
var %i = 1
while ( $nick(#,%i) ) {
write nicks.txt $ifmatch
inc %i
}
}
is it right?
|
|
|
|
Joined: Feb 2003
Posts: 3,412
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 3,412 |
hmm..
on me:*:JOIN:#:{ .timer 1 1 savenicks }
i think you should remove the red stuff..
Last edited by sparta; 16/11/03 05:22 PM.
|
|
|
|
FMJ
|
FMJ
|
but it doesn't work the "timer"... I cancel the red but nothing...  timer requires some code?
Last edited by FMJ; 16/11/03 05:28 PM.
|
|
|
|
Iori
|
Iori
|
Try typing /!remote on and see if it works.
|
|
|
|
FMJ
|
FMJ
|
it say "remote active (events...)" but nothing... I download Mirc 6.12 from this site, I insert the code in script.ini (remote) but nothing... It's my pc that is crush? or is the code?
|
|
|
|
Iori
|
Iori
|
You NEED that red code sparta told you to remove..
|
|
|
|
theRat
|
theRat
|
on me:*:JOIN:#:{
set %join $+ # 1
}
raw 366:*:{
if ( $eval(% $+ join $+ $2,2) ) {
savenicks $2
unset %join $+ $2
}
}
alias savenicks {
var %i = 1
while ( $nick($1,%i) ) {
write nicks.txt $ifmatch
inc %i
}
}
add these to a new script file...
|
|
|
|
FMJ
|
FMJ
|
finally, it works!! Unbelievable!! GREAT!!
|
|
|
|
FMJ
|
FMJ
|
only a problem, it saves my name too... each time... is possible not to save?
|
|
|
|
Joined: Feb 2003
Posts: 806
Hoopy frood
|
Hoopy frood
Joined: Feb 2003
Posts: 806 |
I'm late, but yes.
alias savenicks {
var %i = 1
while ( $nick($1,%i) ) {
if ($ifmatch != $me) { write nicks.txt $ifmatch }
inc %i
}
}
or..
alias savenicks {
var %i = 1
while ( $nick($1,%i) ) {
write nicks.txt $ifmatch
inc %i
}
write -ds $+ $me nicks.txt
}
You can choose any of both, but be sure to read the help file for both regardless of the one you choose.
|
|
|
|
Joined: Mar 2024
Posts: 7
Nutrimatic drinks dispenser
|
Nutrimatic drinks dispenser
Joined: Mar 2024
Posts: 7 |
Is there changes between when this was written and mirc v7.22 ?
I put the code in however it seems to Not write anything .
|
|
|
|
|