Difference between revisions of "ISInterface:ExecuteCommand"
Jump to navigation
Jump to search
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
+ | ==Syntax== | ||
+ | *int ExecuteCommand(const char *Text) | ||
== Purpose == | == Purpose == | ||
− | + | Executing a command | |
== Usage == | == Usage == | ||
=== Parameters === | === Parameters === | ||
+ | *const char *Text | ||
+ | :'''[in]''' Command and arguments to be executed | ||
=== Return Value === | === Return Value === | ||
− | + | *int | |
+ | :The return value of the command function | ||
== Examples == | == Examples == | ||
+ | ;Example Code | ||
+ | void ISXTest::RegisterCommands() | ||
+ | { | ||
+ | pISInterface->AddCommand("ISXTest",CMD_ISXTest,true,false); | ||
+ | } | ||
+ | |||
+ | int __cdecl CMD_ISXTest(int argc, char *argv[]) | ||
+ | { | ||
+ | printf("ISXTest Sample Command"); | ||
+ | pISInterface->ExecuteCommand("Display"); | ||
+ | pISInterface->ExecuteCommand("Wireframe on"); | ||
+ | pISInterface->ExecuteTimedCommand(10000,"Wireframe off"); | ||
+ | pISInterface->ExecuteTimedCommand(10500,"echo weeee"); | ||
+ | |||
+ | return 1; | ||
+ | } | ||
+ | :This command makes use of '''ExecuteCommand''' | ||
== See Also == | == See Also == | ||
* [[ISXDK:ISInterface|ISInterface]] | * [[ISXDK:ISInterface|ISInterface]] |
Latest revision as of 01:12, 2 September 2005
Syntax
- int ExecuteCommand(const char *Text)
Purpose
Executing a command
Usage
Parameters
- const char *Text
- [in] Command and arguments to be executed
Return Value
- int
- The return value of the command function
Examples
- Example Code
void ISXTest::RegisterCommands() { pISInterface->AddCommand("ISXTest",CMD_ISXTest,true,false); } int __cdecl CMD_ISXTest(int argc, char *argv[]) { printf("ISXTest Sample Command"); pISInterface->ExecuteCommand("Display"); pISInterface->ExecuteCommand("Wireframe on"); pISInterface->ExecuteTimedCommand(10000,"Wireframe off"); pISInterface->ExecuteTimedCommand(10500,"echo weeee"); return 1; }
- This command makes use of ExecuteCommand