Difference between revisions of "ISInterface:AddAlias"
Jump to navigation
Jump to search
Line 13: | Line 13: | ||
== Examples == | == Examples == | ||
;Example code | ;Example code | ||
− | void | + | void ISXTest::RegisterAliases() |
{ | { | ||
pISInterface->AddAlias("Hi","echo Hi bob! How was work? What are you going to do tonight?"); | pISInterface->AddAlias("Hi","echo Hi bob! How was work? What are you going to do tonight?"); |
Revision as of 23:42, 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
void ISXTest::RegisterAliases() { 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}"); }