Interface: SelfScriptEngine
Auto.js Pro 9 Docs / engines / SelfScriptEngine
Interface: SelfScriptEngine
engines.SelfScriptEngine
Object of the engine that current script running with.
Hierarchy
↳
SelfScriptEngine
Table of contents
Properties
Methods
- addListener
- emit
- eventNames
- forceStop
- getMaxListeners
- getTag
- listenerCount
- listeners
- off
- on
- once
- prependListener
- prependOnceListener
- rawListeners
- removeAllListeners
- removeListener
- setMaxListeners
Properties
execArgv
• Readonly
execArgv: any
Execution arguments. Includes arguments specified when starting engine, or arguments specified when triggering by work manager. For example, if triggered by intent task, the execArgv
is {intent: ...}
.
executionConfig
• Readonly
executionConfig: ReadOnlyExecutionConfig
Get the execution config of this engine.
Inherited from
id
• Readonly
id: number
Unique id of engine, different from other engine's id.
Inherited from
source
• Readonly
source: any
Source file object of engine.
Inherited from
sourceFile
• Readonly
sourceFile: string
Path of engine source file.
Inherited from
workingDirectory
• Readonly
workingDirectory: string
Directory of engine running. Usually is the root directory of project or the parent directory of script file.
Inherited from
Methods
addListener
▸ addListener(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
emit
▸ emit(event
, ...args
): void
Send event to engine. For nodejs engine, you can use require("engines").myEngine().on("event", () => {})
to listen event; For pro8 engine, you can use $events.on("event", () => {})
to listen event.
Parameters
Name | Type | Description |
---|---|---|
event | string | Event name |
...args | any [] | Event arguments, must be a JSON-able data |
Returns
void
Inherited from
eventNames
▸ eventNames(): string
[]
Returns
string
[]
Inherited from
forceStop
▸ forceStop(): void
Force stop the engine.
Returns
void
Inherited from
getMaxListeners
▸ getMaxListeners(): number
Returns
number
Inherited from
EngineEventTarget.getMaxListeners
getTag
▸ getTag(key
): any
Returns the tag associated with this engine and the specified key.
Parameters
Name | Type |
---|---|
key | string |
Returns
any
Inherited from
listenerCount
▸ listenerCount(event
): number
Parameters
Name | Type |
---|---|
event | string |
Returns
number
Inherited from
EngineEventTarget.listenerCount
listeners
▸ listeners(event
): Function
[]
Parameters
Name | Type |
---|---|
event | string |
Returns
Function
[]
Inherited from
off
▸ off(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
on
▸ on(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
once
▸ once(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
prependListener
▸ prependListener(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
EngineEventTarget.prependListener
prependOnceListener
▸ prependOnceListener(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
EngineEventTarget.prependOnceListener
rawListeners
▸ rawListeners(event
): Function
[]
Parameters
Name | Type |
---|---|
event | string |
Returns
Function
[]
Inherited from
EngineEventTarget.rawListeners
removeAllListeners
▸ removeAllListeners(event?
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event? | string |
Returns
Inherited from
EngineEventTarget.removeAllListeners
removeListener
▸ removeListener(event
, listener
): SelfScriptEngine
Parameters
Name | Type |
---|---|
event | string |
listener | (...args : any []) => void |
Returns
Inherited from
EngineEventTarget.removeListener
setMaxListeners
▸ setMaxListeners(n
): SelfScriptEngine
Parameters
Name | Type |
---|---|
n | number |