WoW:API GetActionText: Difference between revisions

From AddOn Studio
Jump to navigation Jump to search
m (Move page script moved page API GetActionText to API GetActionText without leaving a redirect)
 
(3 intermediate revisions by 3 users not shown)
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.
text = GetActionText(actionSlot)


text = GetActionText(actionSlot)
== Parameters ==
== Parameters ==
=== Arguments ===
<big>'''Arguments'''</big>
:(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>
<big>'''Returns'''</big>
''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.

Latest revision as of 04:45, 15 August 2023

WoW API < GetActionText

Gets the text label for an action.

text = GetActionText(actionSlot)

Parameters[edit]

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.