Difference between revisions of "ISInterface:GetCurrentScript"

From Lavish Software Wiki
Jump to navigation Jump to search
 
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 +
==Syntax==
 +
*bool GetCurrentScript(char *buffer, unsigned long buflen)
 
== Purpose ==
 
== Purpose ==
 
Retrieves the name of the currently executing script.  Keep in mind that multiple scripts can be loaded and running, but internally, only one at a time is allowed to execute a portion.  This is the one, if any, currently allowed to execute.
 
Retrieves the name of the currently executing script.  Keep in mind that multiple scripts can be loaded and running, but internally, only one at a time is allowed to execute a portion.  This is the one, if any, currently allowed to execute.
Line 4: Line 6:
 
== Usage ==
 
== Usage ==
 
=== Parameters ===
 
=== Parameters ===
''none'
+
*char *buffer
 +
:'''[out]''' buffer to give the name of the current script
 +
*unsigned long buflen
 +
:'''[in]''' length of the buffer
 
=== Return Value ===
 
=== Return Value ===
* char *
+
*bool
: Pointer to the name of the currently executing script, or 0.
+
:Returns true on success, false on failure
  
 
== Examples ==
 
== Examples ==
  if (char *ScriptName=pISInterface->GetCurrentScript())
+
  char ScriptName[512];
  printf("%s is currently executing",ScriptName);
+
pISInterface->GetCurrentScript(ScriptName,sizeof(ScriptName));
 +
printf("%s is currently executing",ScriptName);
  
 
== See Also ==
 
== See Also ==

Latest revision as of 20:58, 2 September 2005

Syntax

  • bool GetCurrentScript(char *buffer, unsigned long buflen)

Purpose

Retrieves the name of the currently executing script. Keep in mind that multiple scripts can be loaded and running, but internally, only one at a time is allowed to execute a portion. This is the one, if any, currently allowed to execute.

Usage

Parameters

  • char *buffer
[out] buffer to give the name of the current script
  • unsigned long buflen
[in] length of the buffer

Return Value

  • bool
Returns true on success, false on failure

Examples

char ScriptName[512];
pISInterface->GetCurrentScript(ScriptName,sizeof(ScriptName));
printf("%s is currently executing",ScriptName);

See Also