Wirt 8 Report post Posted January 6, 2017 I'm trying to make an addon work that hides the bar for stances, auras, stealth, etc. which is shown above the actionbar down to the left. I've created a directory inside WoW\Interface\AddOns named StanceBarRemover. Within this folder I've created a .toc file and a .xml file. The .toc file named StanceBarRemover.toc has the following written in it: ## Interface: 10900 ## Title: StanceBarRemover ## Version: 1.0 ## Notes: Removes the Stancebar above the bottomleft actionbar ## Author: Wirt StanceBarRemover.xml The .xml file named StanceBarRemover.xml has the following written in it: <Ui><Script>ShapeshiftBarFrame:Hide()</Script></Ui> It doesn't work. However, when I replace ShapeshiftBarFrame:Hide() with for example MinimapZoomIn:Hide(); MinimapZoomOut:Hide() the minimap zoom buttons are hidden. Also, when I type in chat or make a macro with /script ShapeshiftBarFrame:Hide() it hides the bar without trouble. But I'd like to have this automatized with the help of a simple addon instead. Any ideas on why the script within the addon won't hide the stancebar? 0 Share this post Link to post Share on other sites
Jekylll 0 Report post Posted January 6, 2017 Just use the addons Move Anything or Discord Frame Mover which is more complete but also more complex. There is another one that was developped recently but I can't remember the exact name. 0 Share this post Link to post Share on other sites
EffToyz 12 Report post Posted January 6, 2017 (edited) I guess, you need run your ShapeshiftBarFrame:Hide() on some event. Or, if you using modui or other addon, maybe they turn shiftbar on. Edited January 6, 2017 by EffToyz 0 Share this post Link to post Share on other sites
GDR01 0 Report post Posted January 6, 2017 Make an lua file, and add it to the toc then do something like: local eventframe = CreateFrame("Frame", "eventframe"); local function hide() ShapeshiftBarFrame:Hide(); ShapeshiftBarFrame:UnregisterAllEvents(); end eventframe:RegisterEvent("PLAYER_ENTERING_WORLD"); eventframe:SetScript("OnEvent", hide); or ShapeshiftBarFrame:SetScript("OnEvent", function() ShapeshiftBarFrame:Hide() ShapeshiftBarFrame:UnregisterAllEvents(); end) I'm not really sure whats considered the best way to do it is, but both work. 0 Share this post Link to post Share on other sites
Wirt 8 Report post Posted January 6, 2017 2 hours ago, GDR01 said: Make an lua file, and add it to the toc then do something like: local eventframe = CreateFrame("Frame", "eventframe"); local function hide() ShapeshiftBarFrame:Hide(); ShapeshiftBarFrame:UnregisterAllEvents(); end eventframe:RegisterEvent("PLAYER_ENTERING_WORLD"); eventframe:SetScript("OnEvent", hide); or ShapeshiftBarFrame:SetScript("OnEvent", function() ShapeshiftBarFrame:Hide() ShapeshiftBarFrame:UnregisterAllEvents(); end) I'm not really sure whats considered the best way to do it is, but both work. That really worked! Thank you. My .xml file now has the following written in it: <Ui><Script>ShapeshiftBarFrame:SetScript("OnEvent", function() ShapeshiftBarFrame:Hide() ShapeshiftBarFrame:UnregisterAllEvents(); end)</Script></Ui> The .toc file reads the same as shown in my previous post. 0 Share this post Link to post Share on other sites
Wirt 8 Report post Posted January 6, 2017 I uploaded the addon to megafileupload for anyone interested: http://www.megafileupload.com/8dow/StanceBarRemover.rar Screenshot: http://imgur.com/a/fT4PH 0 Share this post Link to post Share on other sites