mIRC Home    About    Download    Register    News    Help

Print Thread
$script* alias #264897 27/01/19 08:04 PM
Joined: Sep 2005
Posts: 70
deVilbaT Offline OP
Babel fish
OP Offline
Babel fish
Joined: Sep 2005
Posts: 70
Hi there!

Cannot create any alias $script* like $scriptmovie.

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

Execute:
Code:
//echo * $scriptmovie

Thats is normal?
Regards.

Re: $script* alias [Re: deVilbaT] #264898 27/01/19 08:53 PM
Joined: Jul 2014
Posts: 126
Tiago Online
Vogon poet
Online
Vogon poet
Joined: Jul 2014
Posts: 126
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.


TECO
irc.PTirc.org (IRCop)
Re: $script* alias [Re: deVilbaT] #264899 27/01/19 09:06 PM
Joined: Jul 2006
Posts: 3,576
W
Wims Offline
Hoopy frood
Offline
Hoopy frood
W
Joined: Jul 2006
Posts: 3,576
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.


Looking for a good help channel about mIRC? Check #mircscripting @ irc.swiftirc.net