Updated an unknown developer's old "Cancel All Auctions" macro (basically by just adding in a "break"). Obeys the requirements of one-hardware-action-per-cancel, doesn't cancel auctions with bids (or try to cancel already sold auctions), doesn't require any specific auction addon, *does NOT check for underbids*. Open up your auction tab and just keep punching the macro 'til they're all canceled. Enjoy.

Code:

/run local o="owner" p=GetNumAuctionItems(o) for i=1,p do local _,_,c,_,_,_,_,_,_,b,_,_=GetAuctionItemInfo(o,i) if((c>0)and(b==0))then CancelAuction(i) break end end

/run local o="owner" for i=1,GetNumAuctionItems(o)do local _,_,c,_,_,_,_,_,_,b=GetAuctionItemInfo(o,i)if c>0 and b==0 then CancelAuction(i)break end end

Shortened it a little bit for you.

__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

/run local o="owner" for i=1,GetNumAuctionItems(o)do local _,_,c,_,_,_,_,_,_,_,_,_,_,b=GetAuctionItemInfo(o,i)if c>0 and b==0 then CancelAuction(i)break end end

Faster version for spamming to cancel ALL auctions. With the previous version, you'll get a lot of "Item not found" errors because after cancelling, it takes a second or so for it to actually drop off the list, and all that time is wasted on trying over and over to cancel it. This version instead cancels a random auction in the list, so you get much fewer errors and overall the auctions cancel much faster.

Code:

/run local o="owner" p=GetNumAuctionItems(o) if(p>0)then local n=math.random(1,p) local _,_,c,_,_,_,_,_,_,_,_,_,_,b=GetAuctionItemInfo(o,n) if((c>0)and(b==0))then CancelAuction(n) end end

Last edited by KNfLrPn : 11-26-12 at 01:57 PM.
Reason: fixed bug when there are no auctions