WoW:API GetActionText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
(Copy-edited to fit {{wowapi}})
Line 1: Line 1:
<center>'''GetActionText''' - ''Documentation by [[User:Flickering|Flickering]]''</center>
{{wowapi}} __NOTOC__


Get the text label for an action.
Gets the text label for an action.
 
{{Code/Begin}}
text = GetActionText(actionSlot)
text = GetActionText(actionSlot)
{{Code/End}}
{{clr}}
== Parameters ==
== Parameters ==
=== Arguments ===
''Arguments''
:(actionSlot)
 
:;actionSlot : Numeric - The slot number of the action to query.
=== Returns ===
:text


:;text : String - If the action has a text label (such as macro actions), then the label is returned. nil is returned for slots with no label as well as for empty slots.
:;actionSlot - [[ActionSlot]] : The queried slot.


--[[User:Dekstra|Dekstra]] 12:29, 19 April 2006 (EDT)<br>
''Returns''
''Seems to be returning nil for slots with macros in 1.10. To reproduce the test, place any macro button in any slot, and call:''  
/script if (GetActionText([slot])==nil) then ChatFrame1:AddMessage("Action text in that slot is nil"); end;


----
:;text - String
__NOTOC__
:* The action's text, if present.  Macro actions use their names for their action text.
{{Template:WoW API}}
:* nil, if the slot has no action text, or is empty.  Most standard WoW action icons don't have action text.

Revision as of 19:36, 16 October 2006

WoW API < GetActionText

Gets the text label for an action. Template:Code/Begin text = GetActionText(actionSlot) Template:Code/End

Parameters

Arguments

actionSlot - ActionSlot
The queried slot.

Returns

text - String
  • The action's text, if present. Macro actions use their names for their action text.
  • nil, if the slot has no action text, or is empty. Most standard WoW action icons don't have action text.