WoW:API GetBindingAction: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
No edit summary
 
m (Move page script moved page API GetBindingAction to API GetBindingAction without leaving a redirect)
 
(5 intermediate revisions by 5 users not shown)
Line 1: Line 1:
  <center>'''GetBindAction''' ''-Documentation by Sn3b-''</center>
{{wowapi}}
Returns the name of the action performed by the specified binding.
  action = GetBindingAction("binding"[, checkOverride]);


Returns the name of the action performed by a specific key passed as argument.
==Arguments ==
;binding : String - The name of the key (eg. "BUTTON1", "1", "CTRL-G")
;checkOverride : Optional boolean - if true, override bindings will be checked, otherwise, only default (bindings.xml/SetBinding) bindings are consulted.


GetBindingAction();
== Returns ==
 
; action : String - action command performed by the binding. If no action is bound to the key, an empty string is returned.
----
;''Arguments''
 
:String - name of the key (eg. BUTTON1, 1, A)
 
----
;''Example''
 
strMouseActionButton1 = GetBindingAction("BUTTON1");
message(strMouseActionButton1);
 
This will display a message with the name of the action triggered when the left mouse button is pressed. In this case GetBindingAction() returns CAMERAORSELECTORMOVE.
 
----
;''Returns''
 
:String - name of the action
 
----
;''Description''
 
: Returns the name of the action performed by a specific key passed as argument.
 
----
{{Template:WoW API}}
 
 
--[[User:Sn3b|Sn3b]] 16:20, 01 Mar 2005 (EST)

Latest revision as of 04:45, 15 August 2023

WoW API < GetBindingAction

Returns the name of the action performed by the specified binding.

action = GetBindingAction("binding"[, checkOverride]);

Arguments[edit]

binding
String - The name of the key (eg. "BUTTON1", "1", "CTRL-G")
checkOverride
Optional boolean - if true, override bindings will be checked, otherwise, only default (bindings.xml/SetBinding) bindings are consulted.

Returns[edit]

action
String - action command performed by the binding. If no action is bound to the key, an empty string is returned.