Reports & Hearthstone Macros help?

Hello,

I was wondering if there was a way to improve on what I have been able to mash together.

I have macros for Garrison Reports/Garrison Hearth Stone and for Class Hall Report/Dalaran Hearth Stone. But was wondering if there was a way to be able to toggle the reports instead of simply bringing them up and the having to close the window?

The current macros are…

Garrison:

#showtooltip Garrison Hearthstone
/use [btn:2] Garrison Hearthstone
/stopmacro [btn:2]
/run ShowGarrisonLandingPage(Enum.GarrisonType.Type_6_0)

Class Hall/Dalaran:

#showtooltip Dalaran Hearthstone
/use [btn:2] Dalaran Hearthstone
/stopmacro [btn:2]
/run ShowGarrisonLandingPage(Enum.GarrisonType.Type_7_0)

And, before you ask…no I have no idea how to code. I found the “Run” scripts but have no idea how to alter them.

But again, the goal is…

left button to open and then hopefully close the “report” window with a second left click, and right click to use the appropriate hearthstone.

Is this doable?

Yes, this is doable, but there are some challenges because we only have 255 characters to work with.

Another option you might consider: SneekeeMods adds all the past expansion reports to the minimap report button: https://www.curseforge.com/wow/addons/sneekee-mods
If you use the addon, you can access any reports from one place and then just use whichever hearthstone you want.

If you’re set on a macro, then, unless someone has another idea, you’ll need to make a compromise. Your original code isn’t going to differentiate between the left and right button for the /run command, so the report is going to toggle when you hearth.

With this code, based on your original macro, the right button will run or cancel the hearth, and ANY button will toggle the report on/off (so you end up toggling the report when you hearth or cancel):

#showtooltip Garrison Hearthstone
/use [btn:2] Garrison Hearthstone
/stopcasting [btn:2]
/run if GarrisonLandingPage:IsShown() then HideUIPanel(GarrisonLandingPage) else ShowGarrisonLandingPage(Enum.GarrisonType.Type_6_0)end

In my opinion, the cleaner way to do this is to not waste characters on “#showtooltip xxxxxx” so we have room to check for the left button in the /run command. Just pick an icon instead.

In this macro, left button will toggle the report on and off and right button will run or cancel the hearth:

/use [btn:2] Garrison Hearthstone
/stopcasting [btn:2]
/run if SecureCmdOptionParse("[btn:1]") then if GarrisonLandingPage:IsShown() then HideUIPanel(GarrisonLandingPage) else ShowGarrisonLandingPage(Enum.GarrisonType.Type_6_0)end end

and

/use [btn:2] Dalaran Hearthstone
/stopcasting [btn:2]
/run if SecureCmdOptionParse("[btn:1]") then if GarrisonLandingPage:IsShown() then HideUIPanel(GarrisonLandingPage) else ShowGarrisonLandingPage(Enum.GarrisonType.Type_7_0)end end

I hope that helps!