mIRC Homepage

Writing result of a command into a file

Posted By: AlphaOrb

Writing result of a command into a file - 26/11/06 03:31 PM

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
Posted By: billythekid

Re: Writing result of a command into a file - 26/11/06 05:33 PM

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
Posted By: RusselB

Re: Writing result of a command into a file - 27/11/06 12:03 AM

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.
Posted By: Mpdreamz

Re: Writing result of a command into a file - 05/12/06 03:12 PM

write -c c:\channels.txt //users ??
© 2021 mIRC Discussion Forums