mIRC Homepage

$script* alias

Posted By: deVilbaT

$script* alias - 27/01/19 08:04 PM

Hi there!

Cannot create any alias $script* like $scriptmovie.

Step in aliases:
Code:
scriptmovie { return No! }

Execute:
Code:
//echo * $scriptmovie

Thats is normal?
Regards.
Posted By: Tiago

Re: $script* alias - 27/01/19 08:53 PM

Originally Posted By: deVilbaT
Hi there!

Cannot create any alias $script* like $scriptmovie.

Step in aliases:
Code:
scriptmovie { return No! }

Execute:
Code:
//echo * $scriptmovie

Thats is normal?
Regards.

$script

Returns the filename of the currently executing remote script.

$script(N/filename)

Returns the filename for the Nth loaded script file. If you specify a filename, it returns $null if the file is not loaded.

$script(0) return the number of script files loaded
$script(2) returns the filename of the 2nd loaded script file
$script(moo.txt) returns $null if the file is not loaded, or moo.txt if it is.

Note: This cannot be used to reference the users or variables files.
Posted By: Wims

Re: $script* alias - 27/01/19 09:06 PM

To be exact, some identifiers (but almost all directories identifiers) accept trailing text, it is very common to see in script something like "$scriptdirtest.txt" where test.txt is appended to the value of $scriptdir, just as though $+ were used.
$scriptmovie is naturally just $script $+ movie for mIRC, so this is a limitation.

Note that mIRC supports two custom identifiers prefixes '.' and '/' which allows you force mIRC to call the custom alias: if you had an override of the 'me' alias, $me would still call the built-in identifier while $.me or $/me will call your custom 'me' alias. These prefix allows to workaround the limitation; $/scriptmovie will call your alias, but it's not so good practice to use that, renaming the alias to something else would be better.
© 2019 mIRC Discussion Forums