Thread Tools Display Modes
04-13-13, 09:55 PM   #1
Stantious
A Murloc Raider
Join Date: Apr 2013
Posts: 6
Run a command on login help

I've been having strata issues with my party frames, but found a command that will drop it to low strata:

CompactRaidFrameManager:SetFrameStrata(LOW)

I've been looking into a way to fire this command when I log in, using templates I've found from two sources:

http://www.wowinterface.com/forums/s...ad.php?t=34526

http://us.battle.net/wow/en/forum/topic/2743811324

What I've come up with so far:

local frame=CreateFrame("Frame")
frame:RegisterEvent("PLAYER_LOGIN")

frame:SetScript("OnEvent",function(...)

CompactRaidFrameManager:SetFrameStrata(LOW)

end)
No dice. Is there a simple answer I'm missing? This is the first time I've ever experimented with this stuff, and I'm completely lost as to why this wouldn't work. Thank you for your time.
  Reply With Quote
04-13-13, 10:01 PM   #2
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Stantious View Post
I've been having strata issues with my party frames, but found a command that will drop it to low strata:

CompactRaidFrameManager:SetFrameStrata(LOW)

I've been looking into a way to fire this command when I log in, using templates I've found from two sources:

http://www.wowinterface.com/forums/s...ad.php?t=34526

http://us.battle.net/wow/en/forum/topic/2743811324

What I've come up with so far:



No dice. Is there a simple answer I'm missing? This is the first time I've ever experimented with this stuff, and I'm completely lost as to why this wouldn't work. Thank you for your time.
I've never used them before, so not sure what will work or not, but the CRFs are Load On Demand.

Try something like:
Lua Code:
  1. local frame=CreateFrame("Frame")
  2. frame:RegisterEvent("PLAYER_LOGIN")
  3. frame:SetScript("OnEvent",function()
  4.     LoadAddOn("Blizzard_CompactRaidFrames")  
  5.     CompactRaidFrameManager:SetFrameStrata(LOW)
  6. end)
  Reply With Quote
04-13-13, 10:29 PM   #3
Stantious
A Murloc Raider
Join Date: Apr 2013
Posts: 6
Unfortunately that did not work.
  Reply With Quote
04-13-13, 11:21 PM   #4
Vrul
A Scalebane Royal Guard
 
Vrul's Avatar
AddOn Author - Click to view addons
Join Date: Nov 2007
Posts: 404
SetFrameStrata takes a string argument so it would be:
Code:
CompactRaidFrameManager:SetFrameStrata('LOW')
  Reply With Quote
04-13-13, 11:30 PM   #5
Nibelheim
local roygbi-
 
Nibelheim's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 1,600
Originally Posted by Vrul View Post
SetFrameStrata takes a string argument so it would be:
Code:
CompactRaidFrameManager:SetFrameStrata('LOW')
God, I totally missed that

Where's my head at? Ack!
  Reply With Quote
04-13-13, 11:57 PM   #6
Stantious
A Murloc Raider
Join Date: Apr 2013
Posts: 6
I was able to get the following to work once:

Lua Code:
  1. local frame=CreateFrame("Frame")
  2. frame:RegisterEvent("VARIABLES_LOADED")
  3. frame:SetScript("OnEvent",function()
  4.     LoadAddOn("Blizzard_CompactRaidFrames")
  5.     CompactRaidFrameManager:SetFrameStrata('LOW')
  6. end)

But was greeted with an error:

Message: Interface\FrameXML\TargetFrame.lua:1051: attempt to compare number with nil
Time: 04/14/13 01:58:47
Count: 1
Stack: Interface\FrameXML\TargetFrame.lua:1051: in function `Target_Spellbar_AdjustPosition'
Interface\FrameXML\TargetFrame.lua:596: in function `TargetFrame_UpdateAuras'
Interface\FrameXML\TargetFrame.lua:1094: in function `TargetFrame_UpdateBuffsOnTop'
Interface\FrameXML\TargetFrame.lua:244: in function `TargetFrame_OnVariablesLoaded'
Interface\FrameXML\UIParent.lua:711: in function <Interface\FrameXML\UIParent.lua:678>

Locals: self = TargetFrameSpellBar {
barSpark = TargetFrameSpellBarSpark {
}
updateEvent = "PLAYER_TARGET_CHANGED"
barFlash = TargetFrameSpellBarFlash {
}
holdTime = 0
text = TargetFrameSpellBarText {
}
border = TargetFrameSpellBarBorder {
}
unit = "target"
showCastbar = true
borderShield = TargetFrameSpellBarBorderShield {
}
showTradeSkills = false
showShield = true
icon = TargetFrameSpellBarIcon {
}
0 = <userdata>
}
parentFrame = <unnamed> {
0 = <userdata>
}
(*temporary) = nil
(*temporary) = <unnamed> {
0 = <userdata>
}
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = nil
(*temporary) = "attempt to compare number with nil"
EDIT: I am unable to consistently recreate this result. It has worked twice so far.

Last edited by Stantious : 04-14-13 at 12:03 AM.
  Reply With Quote

WoWInterface » AddOns, Compilations, Macros » AddOn Help/Support » Run a command on login help


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