Project

General

Profile

$script » History » Version 6

Per Amundsen, 02/23/2023 07:35 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 6 Per Amundsen
table(ktable).
16
|*Parameter*|*Description*|
17
| N<notextile>|</notextile>filename | The filename to check, if N = 0 number of filenames, otherwise the Nth filename. |
18 4 Per Amundsen
19 1 Per Amundsen
*Properties*
20
21 6 Per Amundsen
table(ktable).
22
|*Property*|*Description*|
23
| .ignore | Returns [[$true]] if the loaded script is ignored in the Script Editor, otherwise [[$false]]. *(AdiIRC only)* |
24 4 Per Amundsen
25 1 Per Amundsen
*Example*
26
27
<pre>
28
; Print number of filename.
29 3 Mr. BS
//echo -ag $script(0)
30 1 Per Amundsen
31
; Print the first filename.
32 3 Mr. BS
//echo -ag $script(1)
33 2 Per Amundsen
34
; Check if 'example.ini' is loaded.
35 3 Mr. BS
//echo -ag $script(example.ini)
36 1 Per Amundsen
</pre>