SecureActionButtonTemplate

All of the attributes listed on this page are modified attributes.

AttributeValuesDescription
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
ValuesDescription

spell (U)

Cast a spell

spell name Specifies the spell name

item (U)

Use an item

item <bag> <slot>

<inventory slot>

name
Tells which item to use

toy (U)

Use a toy

toy itemID

name
Tells which toy to use

macro

Run a macro

macro id

name
Picks the macro to run
macrotext string Runs the given text as a macro

action (U)

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

pet (U)

Cast a pet action

action slot Casts the given pet action

actionbar

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

target

Set your target

unit See above

focus

Set your focus

unit See above

assist

Assist a unit

unit See above

maintank / mainassist

Sets the given role on a unit

action set

clear

toggle
How to apply the role to the unit
unit See above  

stop

Stop a spell cast in progress

cancelaura

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

click

Simulate a click on another button

clickbutton frame The button to click

attribute

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