mIRC Homepage
Posted By: TRT $cd* not working - 05/03/11 02:48 AM
Having an alias that starts with "cd" as its name will not be called when used as an identifier.

seems to be an older issue, tested on clean install

That took some time to track down! laugh
Posted By: FroggieDaFrog Re: $cd* not working - 05/03/11 04:09 AM
Confirmed, but only if the alias is used as a $identifier:
Code:
alias cdthis { 
  $iif($isid,return,echo -a) TRIGGERED with $iif($isid,$!cdthis,/cdthis)
}
alias test {
  /cdthis
  echo -a $cdthis
}
Echos
Quote:
TRIGGERED with /cdthis
* /echo: insufficient parameters (line 6, script1.mrc)
Posted By: jaytea Re: $cd* not working - 05/03/11 04:10 AM
this applies to a few other strings of text, is intentional, and is documented in versions.txt:

Quote:

02/02/2000 - mIRC v5.7

[ ... ]

100. Changed parsing method for most identifiers so that your custom
identifiers will now work even if they begin with the same letters
as internal identifiers.

Directory related identifiers have not been updated, eg. $mircdir,
$getdir, $cd, etc. since many widely used scripts append text
directly to them, ie.:

//splay $file="Select wave:" $mircdirsounds\

Instead of using the (better) format:

//splay $file="Select wave:" $mircdir $+ sounds\


$cd is used in on SERV to return the currently selected directory, and appears in /help $cd
Posted By: FroggieDaFrog Re: $cd* not working - 05/03/11 04:15 AM
Ok, thank you smile
© mIRC Discussion Forums