Thread Tools Display Modes
11-26-10, 08:54 PM   #1
Roane
A Theradrim Guardian
Join Date: Jan 2006
Posts: 66
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.
  Reply With Quote
11-26-10, 10:15 PM   #2
Dainton
A Flamescale Wyrmkin
 
Dainton's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2008
Posts: 115
Perhaps try adding in
Code:
/run PetActionButton1.SetPoint = function() end
at the end
  Reply With Quote
11-26-10, 11:01 PM   #3
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
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.
__________________
[SIGPIC][/SIGPIC]
  Reply With Quote
11-26-10, 11:21 PM   #4
Nobgul
A Molten Giant
 
Nobgul's Avatar
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 693
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
__________________
[SIGPIC][/SIGPIC]
  Reply With Quote
11-27-10, 04:01 AM   #5
Jigain
A Molten Giant
 
Jigain's Avatar
Join Date: Jul 2009
Posts: 732
Originally Posted by nobgul View Post
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?
__________________


  Reply With Quote
11-27-10, 09:17 AM   #6
Roane
A Theradrim Guardian
Join Date: Jan 2006
Posts: 66
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.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » Macro Help » Moving Frame with Macro - Resets in Combat

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off