Difference between revisions of "ObjectType:lavishscript"
Jump to navigation
Jump to search
m (DataType:lavishscript moved to ObjectType:lavishscript) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 9: | Line 9: | ||
*[[DataType:int|int]] '''RunningTime''': Amount of time, in milliseconds, the current application has been running. This value wraps after about 23 days of leaving the application running. | *[[DataType:int|int]] '''RunningTime''': Amount of time, in milliseconds, the current application has been running. This value wraps after about 23 days of leaving the application running. | ||
*[[DataType:string|string]] '''LSModule''': LavishScript version number | *[[DataType:string|string]] '''LSModule''': LavishScript version number | ||
+ | *[[ObjectType:variablescope|variablescope]] '''VariableScope''': The global variable scope | ||
+ | * [[ObjectType:uint|uint]] '''CreateQuery['''expression''']''': ([[LavishScript:Object Queries|Object Queries]]) Creates a query with the given expression -- e.g. ${LavishScript.CreateQuery[Name=="Bonkers"]} | ||
+ | * [[ObjectType:string|string]] '''RetrieveQueryExpression['''#''']''': ([[LavishScript:Object Queries|Object Queries]]) Retrieves the query expression for a previously created query, by ID | ||
+ | * [[ObjectType:bool|bool]] '''QueryEvaluate['''#, object''']''': ([[LavishScript:Object Queries|Object Queries]]) Determines if the given object matches the given query | ||
== Methods == | == Methods == | ||
*'''ExecuteAtom['''name''','''...''']''': Executes an atom with the given name in global- or script-scope (if a script is currently in context). Extra parameters are passed as parameters to the atom. | *'''ExecuteAtom['''name''','''...''']''': Executes an atom with the given name in global- or script-scope (if a script is currently in context). Extra parameters are passed as parameters to the atom. | ||
*'''RegisterEvent['''name''']''': Registers an event of <name> | *'''RegisterEvent['''name''']''': Registers an event of <name> | ||
+ | *'''Eval['''command''','''index:string''']''': Evaluates the given command, directing any lines of output into an index:string | ||
+ | *'''FreeQuery['''#''']''': ([[LavishScript:Object Queries|Object Queries]]) Frees a previously created query, by ID | ||
+ | *'''RegisterEnum['''typeName''','''bool''']''': Registers a new enum and LavishScript Object Type with <typeName>. An optional second parameter controls whether the enum is flags, meaning that multiple values may be combined as part of the same value -- if not provided, the default is FALSE. After registering, value names can be added to the enum type via the Enum TLO | ||
+ | |||
== Returns == | == Returns == | ||
Same as '''Version''' | Same as '''Version''' | ||
Line 23: | Line 31: | ||
===Display amount of time application has been running=== | ===Display amount of time application has been running=== | ||
*echo Time running: ${LavishScript.RunningTime} | *echo Time running: ${LavishScript.RunningTime} | ||
− | + | === Evaluate a command, directing any lines of output into an index === | |
+ | variable index:string MyIndex | ||
+ | LavishScript:Eval["lstype lavishscript",MyIndex] | ||
+ | echo ${MyIndex.Used} lines of output added to MyIndex | ||
== Operates On == | == Operates On == | ||
Line 29: | Line 40: | ||
== See Also == | == See Also == | ||
− | * [[LavishScript: | + | * [[LavishScript:Object_Queries|Object Queries]] |
− | + | {{LavishScript:ObjectType}} | |
− | |||
− |
Latest revision as of 16:41, 8 July 2018
Contents
Description
Members
- string Version: LavishScript version number (e.g. 1.07)
- filepath CurrentDirectory: Current directory according to LavishScript
- filepath Executable: Executable filename for the current process
- string ExecuteAtom[name,...]: Executes an atom with the given name in global- or script-scope (if a script is currently in context). Extra parameters are passed as parameters to the atom. If the atom returns a value, this will be the string given.
- filepath HomeDirectory: Home directory according to LavishScript
- int RunningTime: Amount of time, in milliseconds, the current application has been running. This value wraps after about 23 days of leaving the application running.
- string LSModule: LavishScript version number
- variablescope VariableScope: The global variable scope
- uint CreateQuery[expression]: (Object Queries) Creates a query with the given expression -- e.g. ${LavishScript.CreateQuery[Name=="Bonkers"]}
- string RetrieveQueryExpression[#]: (Object Queries) Retrieves the query expression for a previously created query, by ID
- bool QueryEvaluate[#, object]: (Object Queries) Determines if the given object matches the given query
Methods
- ExecuteAtom[name,...]: Executes an atom with the given name in global- or script-scope (if a script is currently in context). Extra parameters are passed as parameters to the atom.
- RegisterEvent[name]: Registers an event of <name>
- Eval[command,index:string]: Evaluates the given command, directing any lines of output into an index:string
- FreeQuery[#]: (Object Queries) Frees a previously created query, by ID
- RegisterEnum[typeName,bool]: Registers a new enum and LavishScript Object Type with <typeName>. An optional second parameter controls whether the enum is flags, meaning that multiple values may be combined as part of the same value -- if not provided, the default is FALSE. After registering, value names can be added to the enum type via the Enum TLO
Returns
Same as Version
Examples
Display LavishScript version
- echo Version: ${LavishScript.Version}
Display current directory
- echo Directory: ${LavishScript.CurrentDirectory}
Display amount of time application has been running
- echo Time running: ${LavishScript.RunningTime}
Evaluate a command, directing any lines of output into an index
variable index:string MyIndex LavishScript:Eval["lstype lavishscript",MyIndex] echo ${MyIndex.Used} lines of output added to MyIndex
Operates On
none
See Also
LavishScript Object Types
- Text
- string - mutablestring - unistring
- Numbers
- byte - float - float64 - int - uint - int64
- Boolean (TRUE/FALSE)
- bool
- Pointers
- boolptr - byteptr - floatptr - float64ptr - intptr - uintptr - int64ptr - rgbptr - stringptr
- Containers
- objectcontainer - array - index - collection - queue - stack - set - variablescope
- JSON
- jsonobject - jsonarray - jsonvaluecontainer - jsonvalue
- Iteration
- iterator - jsoniterator
- Date/Time
- time
- File Handling
- filepath - file - filelist - filelistentry
- Tasks
- lavishmachine - Accessed via the Top-Level Object LMAC
- task - tasklibrary - taskmanager - tasktype - taskpulseargs - elmactaskstate