Difference between revisions of "ISInterface:AddAlias"
Jump to navigation
Jump to search
(2 intermediate revisions by the same user not shown) | |||
Line 6: | Line 6: | ||
=== Parameters === | === Parameters === | ||
*char *Replace | *char *Replace | ||
− | :String to be replaced by '''With''' | + | :'''[in]'''String to be replaced by '''With''' |
*char *With | *char *With | ||
− | :String to replace the '''Replace''' text with | + | :'''[in]'''String to replace the '''Replace''' text with |
=== Return Value === | === Return Value === | ||
Returns true on success, false on failure | Returns true on success, false on failure | ||
== Examples == | == Examples == | ||
;Example code | ;Example code | ||
− | pISInterface->AddAlias("Hi","echo Hi bob! How was work? What are you going to do tonight?" | + | 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}"); | ||
+ | } | ||
== See Also == | == See Also == | ||
* [[ISXDK:ISInterface|ISInterface]] | * [[ISXDK:ISInterface|ISInterface]] | ||
*[[ISInterface:RemoveAlias|RemoveAlias]] | *[[ISInterface:RemoveAlias|RemoveAlias]] | ||
+ | *[[LavishScript:Aliases|Aliases]] | ||
[[Category:ISXDK]] | [[Category:ISXDK]] | ||
[[Category:ISInterface]] | [[Category:ISInterface]] |
Latest revision as of 01:10, 2 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
- [in]String to be replaced by With
- char *With
- [in]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}"); }