View Single Post
01-11-12, 01:11 PM   #7
SDPhantom
A Pyroguard Emberseer
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2006
Posts: 2,313
Originally Posted by Phanx View Post
Also, I think the @unit alias for target=unit was added more because of the extreme limitations on the length of macros, than as an attempt to clarify the meaning.
They had many reasons to make the alias, and both of those were listed. The one I posted was more of the reason they chose @ over any other identifier.



Originally Posted by Aanson View Post
MacaroonButton503:
Code:
/stopmacro [noequipped:Fishing Poles]
/run SetTracking(1,false)
/run SetTracking(2,true)
/run SetTracking(3,true)
/equip Obsidium Cleaver
/equip Elementium Earthguard
/equip Bloodthirsty Pyrium Helm
/in 2 /stopmacro [Equipped:Fishing Poles] 
/run print("Combat gear equipped successfully")

Anyhoo, I've had a little inspiration from Phanx's suggestion and I've ended up with...

Code:
/cleartarget [@target, dead] [@target, noharm] [@target, help]
/stopmacro [combat] [@target, harm] [@target, dead]
/target Auctioneer
/stopmacro [noexists]
/click AuctionsCancelAuctionButton
/click StaticPopup1Button1
/run print("Attempted to cancel auction")
The first macro, the /in command provided by an addon would error trying to call /stopmacro because it's a secure command. Also the way macros are run, the line after it would execute immediately anyway.

The second macro doesn't guarantee in any way whether or not the user has the AH up. You can run the macro right outside the building (the auctioneers still in view of the client) and the entire macro would still run.



Originally Posted by Aanson View Post
Don't get me wrong though Phanx, if there's a way to make the button only work when the AH is open like
Code:
/run if AuctionFrame:IsVisible() then...
i'd much prefer that! I did try messing about with the idea for a bit without success.
This'll be more specific and only run if the Blizzard_AuctionUI addon is loaded and opened to the auctions tab.
Code:
/run if AuctionFrameAuctions and AuctionFrameAuctions:IsVisible() then AuctionsCancelAuctionButton:Click();StaticPopup1Button1:Click(); end
__________________
WoWInterface AddOns
"All I want is a pretty girl, a decent meal, and the right to shoot lightning at fools."
-Anders (Dragon Age: Origins - Awakening)

Last edited by SDPhantom : 01-11-12 at 01:14 PM.
  Reply With Quote