mIRC Home    About    Download    Register    News    Help

Print Thread
Writing result of a command into a file #165461 26/11/06 03:31 PM
Joined: Oct 2006
Posts: 5
A
AlphaOrb Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
A
Joined: Oct 2006
Posts: 5
Hi,
I want to write the result of a given command to be written into a textfile. At the moment I try this, but that only writes "/users" into the file.

Code:
on 1:join:#Channel: {
  write -c c:\channels.txt /users
}


Anyone an idea?

Greetings,
Flo

Re: Writing result of a command into a file #165462 26/11/06 05:33 PM
Joined: Mar 2003
Posts: 612
B
billythekid Offline
Fjord artisan
Offline
Fjord artisan
B
Joined: Mar 2003
Posts: 612
you need to do /users then write the results

on 1:join:#Channel:users

on 1:snotice:*:{
write text.txt $1-
}

something like that, i cant check here because my server has...

Raw446 billythekid :USERS has been disabled

btk


billythekid
Re: Writing result of a command into a file #165463 27/11/06 12:03 AM
Joined: Aug 2004
Posts: 7,252
R
RusselB Offline
Hoopy frood
Offline
Hoopy frood
R
Joined: Aug 2004
Posts: 7,252
Option 1)
Code:
 on 1:join:#channel:{
write -c c:\channels.txt //users
}
 

Option 2)
Code:
 on 1:join:#Channel:{
  if $exists(c:\channels.txt) { remove c:\channels.txt }
  var %a = 1, %b = $nick($chan,0)
  while %a <= %b {
    write c:\channels.txt $nick($chan,%a)
    inc %a
  }
}
 


BTW: This should've been posted in the Scripts & Pop-ups Forum, not Developer Forum.

Re: Writing result of a command into a file [Re: RusselB] #166022 05/12/06 03:12 PM
Joined: Apr 2004
Posts: 759
M
Mpdreamz Offline
Hoopy frood
Offline
Hoopy frood
M
Joined: Apr 2004
Posts: 759
write -c c:\channels.txt //users ??


$maybe