Difference between revisions of "ISInterface:RunScriptFromBuffer"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
Line 1: Line 1:
 
 
===Syntax===
 
===Syntax===
 
+
*bool RunScriptFromBuffer(char *Name, char *Buffer, unsigned long buflen)
 
== Purpose ==
 
== Purpose ==
 
+
Allows the use of running a script from buffer instead of a file
 
== Usage ==
 
== Usage ==
 
=== Parameters ===
 
=== Parameters ===
 
+
*char *Name
 +
:'''[in]''' Name of the script (will be prepended by "Buffer:")
 +
*char *Buffer
 +
:'''[in]''' Buffer that contains a complete script
 +
*unsigned long buflen
 +
:'''[in]''' Length of the buffer
 
=== Return Value ===
 
=== Return Value ===
 +
*bool
 +
:Returns true on success, false on failure
  
 
== Examples ==
 
== Examples ==
 
+
*char TestScript[]="do\n{\necho hello!\nwait 30\n}\nwhile 1";
 +
*pISInterface->RunScriptFromBuffer("Hello",TestScript,sizeof(TestScript));
  
 
== See Also ==
 
== See Also ==

Latest revision as of 20:48, 2 September 2005

Syntax

  • bool RunScriptFromBuffer(char *Name, char *Buffer, unsigned long buflen)

Purpose

Allows the use of running a script from buffer instead of a file

Usage

Parameters

  • char *Name
[in] Name of the script (will be prepended by "Buffer:")
  • char *Buffer
[in] Buffer that contains a complete script
  • unsigned long buflen
[in] Length of the buffer

Return Value

  • bool
Returns true on success, false on failure

Examples

  • char TestScript[]="do\n{\necho hello!\nwait 30\n}\nwhile 1";
  • pISInterface->RunScriptFromBuffer("Hello",TestScript,sizeof(TestScript));

See Also