mIRC Home    About    Download    Register    News    Help

Print Thread
Page 1 of 2 1 2
#60578 16/11/03 02:20 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
Hi, I'm coding a mirc script...
Anyone knows how to save users of a channel on a file .txt?
Thanks for help.

#60579 16/11/03 02:22 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Code:
alias savenicks {
  var %i = 1
  while ( $nick(#,%i) ) {
    write nicks.txt $ifmatch
    inc %i
  }
}

#60580 16/11/03 02:29 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
sorry, but I'm at beginning... how to recall this "alias"?

#60581 16/11/03 02:33 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
Put it in remotes and type /savenicks in a channel, then open nicks.txt from your mIRC directory.

#60582 16/11/03 02:35 PM
Joined: Oct 2003
Posts: 50
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2003
Posts: 50
go to Tools -> Scripts Editor and put it in Remotes, or remove the word "alias" in the first line and put in in Aliases.

#60583 16/11/03 02:57 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
Thanks, it works! but is it possible to do this every time I enter the channel, without write the command "/savenicks"?

#60584 16/11/03 03:07 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
use a trigger when you join a channel: on $me:JOIN:#:{ savenick } in your remote section..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60585 16/11/03 03:17 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
sorry, but I don't understand... how to do this trigger?

#60586 16/11/03 03:26 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Add this in your remote section.. ALT + R in your mirc..

on $me:JOIN:#:{ savenick }


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60587 16/11/03 03:34 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
That doesn't work.

on me:*:JOIN:#:{ savenicks }

#60588 16/11/03 03:42 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
$me not me ..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60589 16/11/03 03:45 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
No. Try it. It doesn't work with a $, it does without.

#60590 16/11/03 03:48 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
mmm it doesn't work... but the command "savenicks" must be placed in remote.ini or aliases.ini?

#60591 16/11/03 03:51 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
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.
#60592 16/11/03 03:53 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
I know why it doesn't work, it is because on JOIN the names list hasn't been recieved yet..

Code:
on me:*:JOIN:#:{
  set %join $+ # 1
}
raw 366:*:{
  if ( $eval(% $+ join $+ $2,2) ) {
    savenicks
    unset %join $+ $2
  }
}

It all goes in remotes.

#60593 16/11/03 03:54 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
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?

#60594 16/11/03 04:01 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
it doesn't works...
Code:
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.
#60595 16/11/03 04:06 PM
Joined: Dec 2002
Posts: 3,138
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Dec 2002
Posts: 3,138
You missed a carriage return after savenicks.

#60596 16/11/03 04:14 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
in the text I put, but doesn't work too

#60597 16/11/03 04:21 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
is not possible to make a pause before to execute command?

#60598 16/11/03 04:39 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
Yes. use a time.. .timer 1 1 command


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60599 16/11/03 04:49 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
you means
.timer 1 1 savenicks
?

#60600 16/11/03 04:55 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
yes.. on the join command..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60601 16/11/03 04:56 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
I tried this but nothing...
on me:*:JOIN:#:{
.timer 1 1 savenicks
}

#60602 16/11/03 05:02 PM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
Then your mIRC is screwed. that code is solid.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#60603 16/11/03 05:05 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
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.
#60604 16/11/03 05:11 PM
Joined: Oct 2003
Posts: 50
T
Babel fish
Offline
Babel fish
T
Joined: Oct 2003
Posts: 50
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...

#60605 16/11/03 05:12 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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..


if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60606 16/11/03 05:17 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
I put
Code:
 
on me:*:JOIN:#:{
  .timer 1 1 savenicks
}
 

on top of remote (ALT-R), then I put after
Code:
 
alias savenicks {
  var %i = 1
  while ( $nick(#,%i) ) {
    write nicks.txt $ifmatch
    inc %i
  }
}
 


is it right?

#60607 16/11/03 05:19 PM
Joined: Feb 2003
Posts: 3,432
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Feb 2003
Posts: 3,432
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.

if ($me != tired) { return } | else { echo -a Get a pot of coffee now $+($me,.) }
#60608 16/11/03 05:20 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
but it doesn't work the "timer"... confused confused confused

I cancel the red but nothing... crazy

timer requires some code?

Last edited by FMJ; 16/11/03 05:28 PM.
#60609 16/11/03 05:38 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
Try typing /!remote on and see if it works.

#60610 16/11/03 05:48 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
it say "remote active (events...)" but nothing... shocked
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?

#60611 16/11/03 05:55 PM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You NEED that red code sparta told you to remove..

#60612 16/11/03 05:57 PM
Joined: Dec 2002
Posts: 774
T
Hoopy frood
Offline
Hoopy frood
T
Joined: Dec 2002
Posts: 774
Code:
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...


Code:
//if ( khaled isgod ) echo yes | else echo no
#60613 16/11/03 07:10 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
finally, it works!! Unbelievable!! GREAT!! laugh

#60614 17/11/03 07:49 PM
Joined: Nov 2003
Posts: 81
F
FMJ Offline OP
Babel fish
OP Offline
Babel fish
F
Joined: Nov 2003
Posts: 81
only a problem, it saves my name too... each time...
is possible not to save?

#60615 01/12/03 10:30 AM
Joined: Feb 2003
Posts: 810
C
Hoopy frood
Offline
Hoopy frood
C
Joined: Feb 2003
Posts: 810
I'm late, but yes.
Code:
alias savenicks {
  var %i = 1
  while ( $nick($1,%i) ) {
    if ($ifmatch != $me) { write nicks.txt $ifmatch }
    inc %i
  }
}

or..
Code:
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.


* cold edits his posts 24/7
Page 1 of 2 1 2

Link Copied to Clipboard