Wowpedia

We have moved to Warcraft Wiki. Click here for information and the new URL.

READ MORE

Wowpedia
Register
No edit summary
(6 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{wowapi}}
 
{{wowapi}}
   
Changes the current action button set to the one specified in CURRENT_ACTIONBAR_PAGE variable.
+
Changes the current action button to the one specified in the arguments.
   
ChangeActionBarPage()
+
ChangeActionBarPage(actionBarPage)
 
== Parameters ==
 
== Parameters ==
 
=== Arguments ===
 
=== Arguments ===
  +
:(actionBarPage)
:()
 
  +
  +
:;actionBarPage : Numeric - Which page of your action bar to switch to. Expects an integer 1-6.
   
 
=== Returns ===
 
=== Returns ===
:<i>nil</i>
+
:''nil''
   
 
== Example ==
 
== Example ==
 
<!-- begin code -->
 
<!-- begin code -->
function ActionBar_PageUp()
+
function ActionBar_FirstPage()
 
ChangeActionBarPage(1);
CURRENT_ACTIONBAR_PAGE = CURRENT_ACTIONBAR_PAGE + 1;
 
if ( CURRENT_ACTIONBAR_PAGE &gt; NUM_ACTIONBAR_PAGES ) then
 
CURRENT_ACTIONBAR_PAGE = 1;
 
end
 
ChangeActionBarPage();
 
 
end
 
end
 
<!-- end code -->
 
<!-- end code -->
  +
==== Result ====
 
  +
Or for a macro:
:This function does the same thing as pressing the Page Up button. It increments CURRENT_ACTIONBAR_PAGE, checks for a valid page number, then calls ChangeActionBarPage() to change the action bar.
 
  +
  +
<!-- begin code -->
  +
/script ChangeActionBarPage(2);
  +
<!-- end code -->
   
 
== Details ==
 
== Details ==
 
: Notifies the UI that the current action button set has been updated to the current value of the CURRENT_ACTIONBAR_PAGE global variable.
 
: Notifies the UI that the current action button set has been updated to the current value of the CURRENT_ACTIONBAR_PAGE global variable.
   
: Will cause an ACTIONBAR_PAGE_CHANGED event to fire (Whether the event fires when there hasn't actually been a change is untested).
+
: Will cause an ACTIONBAR_PAGE_CHANGED event to fire only if there was actually a change (tested in 2.3.0).
  +
  +
: Do nothing in combat mode
   
 
----
 
----

Revision as of 06:33, 17 February 2008

Changes the current action button to the one specified in the arguments.

ChangeActionBarPage(actionBarPage)

Parameters

Arguments

(actionBarPage)
actionBarPage
Numeric - Which page of your action bar to switch to. Expects an integer 1-6.

Returns

nil

Example

function ActionBar_FirstPage()
   ChangeActionBarPage(1);
end

Or for a macro:

/script ChangeActionBarPage(2);

Details

Notifies the UI that the current action button set has been updated to the current value of the CURRENT_ACTIONBAR_PAGE global variable.
Will cause an ACTIONBAR_PAGE_CHANGED event to fire only if there was actually a change (tested in 2.3.0).
Do nothing in combat mode