mIRC Home    About    Download    Register    News    Help

Print Thread
#29308 12/06/03 09:36 AM
Joined: May 2003
Posts: 26
T
Ameglian cow
OP Offline
Ameglian cow
T
Joined: May 2003
Posts: 26
hey,

is it possible to make a little script which will echo back all aliases ?

#29309 12/06/03 10:39 AM
Joined: Jan 2003
Posts: 2,523
Q
Hoopy frood
Offline
Hoopy frood
Q
Joined: Jan 2003
Posts: 2,523
Try this:
Code:
alias listaliases {
  close -@ @aliases
  window -nk0 @aliases
  var %i = 1, %o = $+(+,$iif(-l* !iswm $1,(?!-l +\S)),(\S+))
  while $alias(%i) {
    filter -fwg $+(",$ifmatch,") @aliases /^(?i)(?>n\d+=|)[^; ]\S* +\S/
    inc %i
  }
  var %i = 1, %a = $line(@aliases,0)
  while $script(%i) {
    filter -fwg $+(",$ifmatch,") @aliases /^(?i)(?>n\d+=|)alias %o +\S/
    inc %i
  }
  %i = $line(@aliases,0)
  while %i > %a {
    !.echo -q $regex($line(@aliases,%i),/^(?>n\d+=|)alias +(?:-l +)?(\S+) /i)
    rline @aliases %i $regml(1)
    dec %i
  }
  while %i {
    !.echo -q $regex($line(@aliases,%i),/^(?>n\d+=|)([^; ]\S*)/i)
    rline @aliases %i $regml(1)
    dec %i
  }
  filter -wwct 2 47 @aliases @aliases
  window -a @aliases
}
/listaliases lists all aliases in the @aliases custom window. By default, it only lists the global aliases; if you include the -l switch (ie /listaliases -l) local aliases are included too.


/.timerQ 1 0 echo /.timerQ 1 0 $timer(Q).com
#29310 12/06/03 11:00 AM
Joined: Jan 2003
Posts: 73
K
Babel fish
Offline
Babel fish
K
Joined: Jan 2003
Posts: 73
i get errors trying to use that

#29311 12/06/03 11:07 AM
Joined: Jun 2003
Posts: 10
P
Pikka bird
Offline
Pikka bird
P
Joined: Jun 2003
Posts: 10
i don't got any errors :}
make sure that you use mirc 6.03
and you format the text as it must be in mirc.
because, when i select the text, and copy/paste it in mirc,
the text appear as it's not formatted...
put | or separate the code using enter key =)


Link Copied to Clipboard