11# LLSE - Generic Scripting Interface Documentation
22
3- > Here are some commonly used ** auxiliary functions** , such as plugin registration, output information and asynchronous interfaces, etc.
3+ > Here are some commonly used ** auxiliary functions** , such as plugin registration, output information and asynchronous
4+ > interfaces, etc.
45
56They make it easier and more natural for you to develop scripts and avoid a lot of unnecessary details.
67
@@ -10,124 +11,111 @@ The following APIs add necessary auxiliary interfaces to scripts.
1011
1112### Output Information To The Console
1213
13- ` log(data1,data2,...) `
14+ ` log(data1,data2,...) `
1415
1516- Parameter:.,
16- - Variable or data to be output
17- Can be of any type, and the number of parameters can be any number.
17+ - Variable or data to be output
18+ Can be of any type, and the number of parameters can be any number.
1819- Return value: none
1920
20-
21-
2221### Output Color Text
2322
2423This is an upgraded version of the above function; it supports color output.
2524
2625` colorLog(color,data1,data2,...) `
2726
28- - Parameter:
29- - color : ` String `
30- The color output by this line (code example and effect are as follows)
31- - data... :
32- Variable or data to be output
33- Can be of any type, and the number of parameters can be any number.
34- - Return value: none
35-
36- #### Show results:
37-
38- ![ ColorLogExample] ( ../../../assets/ColorLog.png )
27+ - Parameter:
28+ - color : ` String `
29+ The color output by this line (code example and effect are as follows)
30+ - data... :
31+ Variable or data to be output
32+ Can be of any type, and the number of parameters can be any number.
33+ - Return value: none
3934
35+ #### Show results:
4036
37+ ![ ColorLogExample] ( ../../../img/ColorLog.png )
4138
4239### Asynchronous Output
4340
44- This function returns immediately after the output request is sent, avoiding the blocking time caused by synchronous reading and writing.
41+ This function returns immediately after the output request is sent, avoiding the blocking time caused by synchronous
42+ reading and writing.
4543The bottom layer has lock protection, different ` fastLog ` There will be no string phenomenon between.
4644
4745` fastLog(data1,data2,...) `
4846
49- - Parameter:
50- - data... :
51- Variable or data to be output
52- Can be of any type, and the number of parameters can be any number
53- - Return value: none
54-
55-
47+ - Parameter:
48+ - data... :
49+ Variable or data to be output
50+ Can be of any type, and the number of parameters can be any number
51+ - Return value: none
5652
57- ### Delay the execution of a function for a period of time
53+ ### Delay the execution of a function for a period of time
5854
5955` setTimeout(func,msec) `
6056
61- - Parameter:
57+ - Parameter:
6258
63- - func : ` Function `
64- The function to be executed.
59+ - func : ` Function `
60+ The function to be executed.
6561
66- - msec : ` Integer `
67- Delay execution time (milliseconds)
62+ - msec : ` Integer `
63+ Delay execution time (milliseconds)
6864- Return value: this task id.
6965- Return value type: ` Integer `
70- - If it returns ` Null ` , the task failed.
71-
72-
66+ - If it returns ` Null ` , the task failed.
7367
7468### Delay the execution of a code segment for a period of time (eval)
7569
7670` setTimeout(code,msec) `
7771
78- - Parameter:
72+ - Parameter:
7973
80- - code : ` String `
81- The code segment to be executed.
74+ - code : ` String `
75+ The code segment to be executed.
8276
83- - msec : ` Integer `
84- Delay execution time (milliseconds)
85- - Return value: this task id
77+ - msec : ` Integer `
78+ Delay execution time (milliseconds)
79+ - Return value: this task id
8680- Return value type: ` Integer `
87- - If it returns ` Null ` , the task creation failed.
88-
89-
81+ - If it returns ` Null ` , the task creation failed.
9082
9183### Set period execution function
9284
9385` setInterval(func,msec) `
9486
95- - Parameter:
96- - func : ` Function `
97- The function to be executed
87+ - Parameter:
88+ - func : ` Function `
89+ The function to be executed
9890
99- - msec : ` Integer `
100- Execution interval period (ms)
91+ - msec : ` Integer `
92+ Execution interval period (ms)
10193- Return value: this task id
10294- Return value type: ` Integer `
10395
104-
105-
10696### Set period execution code segment (eval)
10797
10898` setInterval(code,msec) `
10999
110- - Parameter:
111- - code : ` String `
112- The code to be executed.
100+ - Parameter:
101+ - code : ` String `
102+ The code to be executed.
113103
114- - msec : ` Integer `
115- Execution interval period (ms)
116- - Return value: this task id
104+ - msec : ` Integer `
105+ Execution interval period (ms)
106+ - Return value: this task id
117107- Return value type: ` Integer `
118- - If it returns ` Null ` , the task creation failed.
119-
120-
108+ - If it returns ` Null ` , the task creation failed.
121109
122- ### Cancel Delay/Period Execution Item
110+ ### Cancel Delay/Period Execution Item
123111
124112` clearInterval(taskid) `
125113
126- - Parameter:
127- - timerid : ` Integer `
128- The task ID returned by the first few functions
114+ - Parameter:
115+ - timerid : ` Integer `
116+ The task ID returned by the first few functions
129117- Return value: whether the cancellation was successful.
130118- Return value type: ` Boolean `
131- - If it returns ` Null ` , the cancellation of the task failed.
119+ - If it returns ` Null ` , the cancellation of the task failed.
132120
133121
0 commit comments