Running scripts with weakauras

hello,

I have a script i would like to run with weakauras. I managed to make small one-liner scripts work when i put them into a custom trigger.

If its something like this:

TargetFrameSpellBar:ClearAllPoints()
TargetFrameSpellBar:SetPoint(“CENTER”, 125, -62)
TargetFrameSpellBar.SetPoint = function() end

I cant make it run with weakauras. This code works since i run it successfully with an addon so its either limited by weakauras or im doing something wrong (which is more likely :D)

I just want to move everything into Weakauras. Ive got a bunch of other scripts and i want to have everything in one place.

How would I have to rewrite this code to run it with weakauras? Any help is greatly appreciated

Actions tab → On Init → Custom checkbox → Paste your code there. Add a print statement in there or something to see if it triggers at all.

thank you so much!!

I was able to put many of my scripts into weakauras with this method. Only script left that is not working is this here:

local f=CreateFrame(“frame”)
f:RegisterEvent(“PLAYER_LOGIN”)
f:SetScript(“OnEvent”,function(self)
DefaultCompactUnitFrameOptions.displayRoleIcon = false
end)

Any idea what might be the cause for this?

Well, you are probably already logged on before WA executes this, so PLAYER_LOGIN never fires. It doesn’t need that anyway, you can just use the line DefaultCompactUnitFrameOptions.displayRoleIcon = false only.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.