Difference between revisions of "ISInterface:ExecuteTimedCommand"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
==Syntax==
 +
*void ExecuteTimedCommand(unsigned long DelayMS, const char *Text)
 
== Purpose ==
 
== Purpose ==
 
+
To execute a command after a given time.
 
== Usage ==
 
== Usage ==
 
=== Parameters ===
 
=== Parameters ===
=== Return Value ===
+
*unsigned long DelayMS
 +
:'''[in]'''Delay, in milliseconds to wait before executing '''Text'''
 +
*const char *Text
 +
:'''[in]'''Name of the command and arguments to be run
  
 
== 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 '''ExecuteTimedCommand'''
 
== See Also ==
 
== See Also ==
 
* [[ISXDK:ISInterface|ISInterface]]
 
* [[ISXDK:ISInterface|ISInterface]]
 
+
* [[ISInterface:ExecuteCommand]]
 
[[Category:ISXDK]]
 
[[Category:ISXDK]]
 
[[Category:ISInterface]]
 
[[Category:ISInterface]]

Latest revision as of 01:11, 2 September 2005

Syntax

  • void ExecuteTimedCommand(unsigned long DelayMS, const char *Text)

Purpose

To execute a command after a given time.

Usage

Parameters

  • unsigned long DelayMS
[in]Delay, in milliseconds to wait before executing Text
  • const char *Text
[in]Name of the command and arguments to be run

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 ExecuteTimedCommand

See Also