Fandom

WoWWiki

API ToggleSpellBook

104,632pages on
this wiki
Add New Page
Talk0 Share

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.


WoW API < ToggleSpellBook
Icon-information-22x22This function is implemented by FrameXML in [DEPRECATED http://wowprogramming.com/utils/xmlbrowser/live/FrameXML/SpellBookFrame.lua FrameXML/SpellBookFrame.lua].


ToggleSpellBook(bookType);

Shows/Hides the Spellbook.


Parameters Edit

Arguments Edit

bookType
string containing which spellbook to open. Valid choices are "spell", "mount", "pet", "general", or any spec name (e.g. "assasination", "fire", etc). Only "spell" and "pet" will open the full spellbook (with all the tabs to click on), the rest will open only that tab (with no tabs to click on).
bookType (in version 4.2.0.14480)
string is optional. without parameter opens the book with the last used tab. current valid choices are "spell", "mount", "professions", "pet", "companions" for the bottom tabs line. direct accessability for talent spell are missing.


Returns Edit

nil


Example Edit

ToggleSpellBook("spell");


Details Edit

Shows the Spellbook. Equivalent to pressing 'P'. Note that if you do not have any pet spells, passing in "pet" will do nothing.
If you want to open the spellbook using Lua, don't use this, use ToggleFrame(SpellBookFrame) instead.
However both ToggleFrame(SpellBookFrame) and ToggleSpellBook("spell") will not execute successfully while in combat using Lua due to AddOn Taint unless the Spell Book was previously opened during the same game session.

Also on Fandom

Random Wiki