ISXDK:Running a Script or Command File

From Lavish Software Wiki
Jump to: navigation, 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