SecureActionButtonTemplate
All of the attributes listed on this page are modified attributes.
Attribute | Values | Description |
---|---|---|
type |
See below | Determines the type of action to take when clicked. |
unit |
unitID | Controls the target of the action. |
unitsuffix |
target [target ]…pet [target ]… |
Alternative to unit , this attribute's value is appended to the parent frame's unit and used as if it were the unit attribute. |
helpbutton |
string | Specifies a suffix to be used by the modified attribute system when the current unit is friendly. |
harmbutton |
string | Like helpbutton but for hostile units. If harmbutton is chosen, helpbutton will be ignored. |
target-bag |
bagID | Used with target-slot to specify the target of an item-targetable spell (e.g. an enchantment). |
target-slot |
inventory slot bag slot |
Used alone to specify an inventory slot, or with target-bag to specify an item in your bags. |
target-item |
name | Specifies a target item by name. |
checkselfcast |
boolean | Causes the unit to respect your self-cast modifier key settings. |
type
Attribute Values
Following are the possible values for the type
attribute including any subordinate attributes the types use. If a type is marked with (U), it can optionally use the unit
/unitsuffix
attributes to direct its action.
type Attribute | Subordinate Attributes | Values | Description |
---|---|---|---|
Cast a spell |
spell |
name | Specifies the spell name |
Use an item |
item |
<bag> <slot><inventory slot> name |
Tells which item to use |
Use a toy |
toy |
itemID name |
Tells which toy to use |
Run a macro |
macro |
id name |
Picks the macro to run |
macrotext |
string | Runs the given text as a macro | |
Use an action slot |
action |
slot | Uses the specified action slot |
actionpage |
page | Uses an action based on the action bar page and the button's ID | |
Cast a pet action |
action |
slot | Casts the given pet action |
Change action bar pages |
action |
increment decrement |
Advance up or down one page |
page | Switch directly to a page | ||
one, other |
Swap between one and other | ||
Set your target |
unit |
See above | — |
Set your focus |
unit |
See above | — |
Assist a unit |
unit |
See above | — |
Sets the given role on a unit |
action |
set clear toggle |
How to apply the role to the unit |
unit |
See above | ||
Stop a spell cast in progress |
— | — | — |
Cancel a buff |
spell |
name | The spell buff/debuff to cancel |
unit |
See above | Unit must be under player's control | |
target-slot |
See above | The temporary enchant to cancel | |
Simulate a click on another button |
clickbutton |
frame | The button to click |
Set an attribute on a frame |
attribute-frame |
frame | The frame on which to set the attribute |
attribute-name |
string | The name of the attribute to set | |
attribute-value |
any | The value to set on the attribute | |
function(frame, unit, button) | If the type attribute is set to a function, it will be called with the parameters shown here |