ISXDK:Running a Script or Command File

From Lavish Software Wiki
Revision as of 00:19, 8 September 2005 by Beefalo (talk | contribs)
(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to navigation Jump to search

Summary

This tutorial teaches you how to use the RunCommandFile, RunScriptFromBuffer and RunScript function inside your extension.

Syntax

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

Examples

Run a command file

  • pISInterface->RunCommandFile("CommandFiles\\test.ice")

Run a script from a buffer

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

Run a script

  • pISInterface->RunScript("MyTestScripts/FirstTest/test");

End a script

  • pISInterface->EndScript("test");

See Also