WoW:API RunBinding: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
mNo edit summary
(upgraded deprecated template)
Line 1: Line 1:
{{wowapi}}
<center>'''RunBinding''' ''-Documentation by [[user:Lego|Lego]]-''</center>
<center>'''RunBinding''' ''-Documentation by [[user:Lego|Lego]]-''</center>


Line 31: Line 32:
----
----
__NOTOC__
__NOTOC__
{{Template:WoW API}}

Revision as of 18:13, 6 January 2007

WoW API < RunBinding

RunBinding -Documentation by Lego-

Executes a key binding as if a key was pressed.

RunBinding("command" {,"up"});

Arguments

("command" {,"up"})
command
String - Name of the key binding to be executed
up
String - The string literal "up". If specified, the binding is run as if the key was released.

Example

RunBinding("TOGGLEFPS");

Toggles the display of the FPS counter, as if CTRL+R was pressed.

Details

The "command" argument must match one of the (usually capitalized) binding names in a Bindings.xml file. This can be a name that appears in the Blizzard FrameXML Bindings.xml, or one that is specified in an AddOn.

RunBinding cannot be used to call a Protected Function from an unsigned addon.

By default, the key binding is executed as if the key was pressed down, in other words the keystate variable will have value "down" during the binding's execution. By specifying the optional second argument (the actual string "up"), the binding is instead executed as if the key was released, in other words the keystate variable will have value "up" during the binding's execution.