$script » History » Version 3
Mr. BS, 06/24/2016 10:30 PM
1 | 1 | Per Amundsen | _Added in 1.9.0_ |
---|---|---|---|
2 | |||
3 | *$script* |
||
4 | |||
5 | Returns the filename for the current running script. |
||
6 | |||
7 | ----------------------------------------------------------------------------- |
||
8 | |||
9 | *$script(N|filename)* |
||
10 | |||
11 | Returns the filename for the Nth loaded script file. If you specify a filename, it returns [[$null]] if the file is not loaded. |
||
12 | |||
13 | *Parameters* |
||
14 | |||
15 | N|filename - The filename to check, if N = 0 number of filenames, otherwise the Nth filename. |
||
16 | |||
17 | *Example* |
||
18 | |||
19 | <pre> |
||
20 | ; Print number of filename. |
||
21 | 3 | Mr. BS | //echo -ag $script(0) |
22 | 1 | Per Amundsen | |
23 | ; Print the first filename. |
||
24 | 3 | Mr. BS | //echo -ag $script(1) |
25 | 2 | Per Amundsen | |
26 | ; Check if 'example.ini' is loaded. |
||
27 | 3 | Mr. BS | //echo -ag $script(example.ini) |
28 | 1 | Per Amundsen | </pre> |