PrintCmd

PrintCmd

0 Downloads

Ever updated/changed a WeakAura or a custom addon and felt you need to print a value and see what it does?

Usually you'd do /run print(UnitHealth) if you were to check the existence of UnitHealth.

This can get tiresome having to writte /run print() all the time, so this addon adds /print command.

This means instead of writing /run print(UnitHealth) you'd write /print UnitHealth.

Not only does this work with expressions,

This does also work with statements:

Let's say you'd write /run local a = 5 local b = 7 print(a + b), with this addon you can do /print local a = 5 local b = 7 return a + b.

Examples

Here are a few examples of what you could do

Expression

/run print(UnitHealth("player") / UnitHealthMax("player"))

Turns into

/print UnitHealth("player") / UnitHealthMax("player")

Statement

/run local health = UnitHealth("player") local healthMax = UnitHealthMax("player") print(health / healthMax)

Turns into

/print local health = UnitHealth("player") local healthMax = UnitHealthMax("player") return health / healthMax

Why though?

No big reason. I found myself spending lots of times working on stuff so having a /print command means I don't need to have /run print( in my clipboard and risking to forget a ) at the end.

I couldn't find this addon anywhere so figured I'd make it myself, and at that point there's no reason not to share it with others to use.