Difference between revisions of "ISInterface:AddAlias"

From Lavish Software Wiki
Jump to navigation Jump to search
m
 
Line 1: Line 1:
 +
==Syntax==
 +
*bool AddAlias(char *Replace, char *With)
 
== Purpose ==
 
== Purpose ==
 
+
An alias is something that means the same as another, also meaning "also known as" (alias 'aka'). In the LavishScript context, an alias is a way to make your own name for a command, possibly customizing the parameters along the way.
 
== Usage ==
 
== Usage ==
 
=== Parameters ===
 
=== Parameters ===
 +
*char *Replace
 +
:String to be replaced by '''With'''
 +
*char *With
 +
:String to replace the '''Replace''' text with
 
=== Return Value ===
 
=== Return Value ===
 
+
Returns true on success, false on failure
 
== Examples ==
 
== Examples ==
 
+
;Example code
 +
pISInterface->AddAlias("Hi","echo Hi bob! How was work? What are you going to do tonight?"
 +
pISInterface->AddAlias("pipforegroundsize","WindowSize -rescale -viewable ${Display.Width}x${Display.Height}")
 
== See Also ==
 
== See Also ==
 
* [[ISXDK:ISInterface|ISInterface]]
 
* [[ISXDK:ISInterface|ISInterface]]
 
+
*[[ISInterface:RemoveAlias|RemoveAlias]]
 
[[Category:ISXDK]]
 
[[Category:ISXDK]]
 
[[Category:ISInterface]]
 
[[Category:ISInterface]]

Revision as of 23:36, 1 September 2005

Syntax

  • bool AddAlias(char *Replace, char *With)

Purpose

An alias is something that means the same as another, also meaning "also known as" (alias 'aka'). In the LavishScript context, an alias is a way to make your own name for a command, possibly customizing the parameters along the way.

Usage

Parameters

  • char *Replace
String to be replaced by With
  • char *With
String to replace the Replace text with

Return Value

Returns true on success, false on failure

Examples

Example code
pISInterface->AddAlias("Hi","echo Hi bob! How was work? What are you going to do tonight?"
pISInterface->AddAlias("pipforegroundsize","WindowSize -rescale -viewable ${Display.Width}x${Display.Height}")

See Also