mIRC Home    About    Download    Register    News    Help

Topic Options
#264897 - 27/01/19 08:04 PM $script* alias
deVilbaT Offline
Babel fish

Registered: 04/09/05
Posts: 68
Loc: New Port, Oregon
Hi there!

Cannot create any alias $script* like $scriptmovie.

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

Execute:
Code:
//echo * $scriptmovie

Thats is normal?
Regards.

Top
#264898 - 27/01/19 08:53 PM Re: $script* alias [Re: deVilbaT]
Tiago Online
Vogon poet

Registered: 05/07/14
Posts: 117
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)

Top
#264899 - 27/01/19 09:06 PM Re: $script* alias [Re: deVilbaT]
Wims Offline
Planetary brain

Registered: 31/07/06
Posts: 3495
Loc: France
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

Top