WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   Macro Help (https://www.wowinterface.com/forums/forumdisplay.php?f=140)
-   -   Moving Frame with Macro - Resets in Combat (https://www.wowinterface.com/forums/showthread.php?t=37090)

Roane 11-26-10 08:54 PM

Moving Frame with Macro - Resets in Combat
 
I have made this macro to move my pet bar:

/run ShapeshiftBarFrame:Hide()
/run PetActionButton1:ClearAllPoints()
/run PetActionButton1:SetPoint("BOTTOMLEFT", MultiBarBottomRight, "TOPLEFT", 65, 5)

I'm using a macro to do it because I only want it for the one character and I'm also afraid that using an addon to do it will interfere with the rest of my action bar placement which is controlled by an addon, but not configurable (TidyBar).

The macro works wonderfully. However, as soon as I enter combat or take a quest (possibly other actions as well), it resets to its original location. I can just click the macro button to move it back again, even in combat, but this is going to be irritating soon. The other thing the macro does, hiding the stance bar, does not reset.

Any ideas on what I can add or do differently to help the pet bar's position persist?

Thanks.

Dainton 11-26-10 10:15 PM

Perhaps try adding in
Code:

/run PetActionButton1.SetPoint = function() end
at the end

Nobgul 11-26-10 11:01 PM

The reason why is that the addon that is controlling your action bar's for on events. When it fires the addon moves the bar back. Now you can create a small addon to also trigger on a even and move the bar back but then it would be bouncing all over the screen. The other option is to modify the action bar mod you are using to fix it.

I am downloading the addon now to see if i can isolate the code. Will get back to you in a few mins.

Nobgul 11-26-10 11:21 PM

Ok here we go wheeeee.

First of all doing anything I post here could and will adversly affect any other class that has a pet bar. With that being said let the mod's begin =P.

Go to line 95 and change that line to the one you are using in your macro.
That should perm put your action bar where you want it. Now it seems you want to get rid of the shape shift bar. So lets tackle that.


Go to line 80. That whole block of code change with .

lua Code:
  1. if Class == "HUNTER" then
  2.      ShapeshiftBarFrame:Hide()
  3. elseif ShapeshiftButton1:IsShown() then
  4.      ShapeshiftButton1:ClearAllPoints();
  5.      ShapeshiftButton1:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, anchorOffset);
  6.      anchor = ShapeshiftButton1
  7.      anchorOffset = 4
  8. end

Jigain 11-27-10 04:01 AM

Quote:

Originally Posted by nobgul (Post 220034)
Ok here we go wheeeee.

First of all doing anything I post here could and will adversly affect any other class that has a pet bar. With that being said let the mod's begin =P.

Go to line 95 and change that line to the one you are using in your macro.
That should perm put your action bar where you want it. Now it seems you want to get rid of the shape shift bar. So lets tackle that.


Go to line 80. That whole block of code change with .

lua Code:
  1. if Class == "HUNTER" then
  2.      ShapeshiftBarFrame:Hide()
  3. elseif ShapeshiftButton1:IsShown() then
  4.      ShapeshiftButton1:ClearAllPoints();
  5.      ShapeshiftButton1:SetPoint("BOTTOMLEFT", anchor, "TOPLEFT", 0, anchorOffset);
  6.      anchor = ShapeshiftButton1
  7.      anchorOffset = 4
  8. end

Do correct me if I'm wrong, but... one solution to the "problem" of affecting multiple characters could be copying the addon first, renaming it slightly, edit one of them as per your description above, and then loading the edited version only on the one character where the petbar and stancebar should be modified?

Roane 11-27-10 09:17 AM

Thank you for the help, everyone.

The additional line on the macro worked.

I couldn't get the addon changes to work, but will try again. (It just did nothing, though the mod was definitely loading and the changes were in the right file. It was late. I was tired. Mistakes were probably made by me somewhere.)

It's a great idea to just make a second copy of the addon just for my hunter characters.


All times are GMT -6. The time now is 02:27 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI