Difference between revisions of "ObjectType:script"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 7: Line 7:
 
*[[DataType:filepath|filepath]] '''CurrentDirectory''': Current working directory for this script
 
*[[DataType:filepath|filepath]] '''CurrentDirectory''': Current working directory for this script
 
*[[DataType:bool|bool]] '''Paused''': Scripts current paused state
 
*[[DataType:bool|bool]] '''Paused''': Scripts current paused state
 
+
*[[DataType:bool|bool]] '''Profiling''': Profiling status true/false. Debugging must be allowed for profiling to be on.
 +
*[[DataType:bool|bool]] '''AllowDebug''': If debugging is allowed
 
== Methods ==
 
== Methods ==
 
*'''End''': Ends execution of this script
 
*'''End''': Ends execution of this script
Line 16: Line 17:
 
*'''Resume''': Resumes this script
 
*'''Resume''': Resumes this script
 
*'''ExecuteAtom['''name''','''...''']''': Executes an atom in script-scope with the given name.  Any extra parameters are passed as parameters to the atom.
 
*'''ExecuteAtom['''name''','''...''']''': Executes an atom in script-scope with the given name.  Any extra parameters are passed as parameters to the atom.
 
+
*'''EnableProfiling''': Enables script profiling. Debugging must be turned on to enable.
 +
*'''DisableProfiling''': Disables script profiling.
 +
*'''DisableDebugging''': Disables debugging.
 +
*'''DumpStack''': Dumps the current stack into the console.
 +
*'''DumpProfiling''': Dumps the entire script into the console.
 
== Returns ==
 
== Returns ==
 
TRUE
 
TRUE

Revision as of 06:40, 11 October 2005

Description

Members

  • string Filename: Filename of this script
  • variable Variable[name]: A given script-scope variable
  • int RunningTime: Number of milliseconds since this script began
  • filepath CurrentDirectory: Current working directory for this script
  • bool Paused: Scripts current paused state
  • bool Profiling: Profiling status true/false. Debugging must be allowed for profiling to be on.
  • bool AllowDebug: If debugging is allowed

Methods

  • End: Ends execution of this script
  • QueueCommand[command]: Inserts a command in the script's command queue
  • Squelch: Squelches most output from this script (excluding most errors and generally excluding Echo)
  • Unsquelch: Unsquelches
  • Pause: Pauses this script
  • Resume: Resumes this script
  • ExecuteAtom[name,...]: Executes an atom in script-scope with the given name. Any extra parameters are passed as parameters to the atom.
  • EnableProfiling: Enables script profiling. Debugging must be turned on to enable.
  • DisableProfiling: Disables script profiling.
  • DisableDebugging: Disables debugging.
  • DumpStack: Dumps the current stack into the console.
  • DumpProfiling: Dumps the entire script into the console.

Returns

TRUE

Examples

Display if a script is running

  • echo ${Script[VentriloHUD](exists)}
Output
TRUE

End a script

  • Script[VentriloHUD]:End
  • Script:End
Note: When used as a command within a script will end the script

Set a variable inside a currently running script

  • Script[KillCount].Variable[TotalKills]:Set[0] - Will set the variable called TotalKills in the currently running script called KillCount to zero.

See Also