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