1. Hello again. Once more I'm having problems at the auction house, but this times its when I try and sell stuff.

    My objective is to eventually have a function that will search through my bags and allow me to sell all the items with one key press.

    At the moment (for testing purposes), the first four slots of my first bag contain 1 peacebloom, 1 goldthorn, 1 silverleaf and 1 linen cloth

    My code is

     for loop=1,4 do
        print(loop) -- just to check that it fully works 1-4
        PickupContainerItem(0,loop) -- get it onto cursor
        AuctionFrameAuctions.duration=3 -- set for 48hrs
    
        -- not sure if these next 4 lines are really needed,
        -- but I put them in just to be sure.
    
        AuctionsStackSizeEntry:SetText(1) -- stack size of 1
        AuctionsNumStacksEntry:SetText(1) -- 1 stack
        MoneyInputFrame_SetCopper(StartPrice, 5000) -- 50 silver bid
        MoneyInputFrame_SetCopper(BuyoutPrice, 7500) -- 75 silver buyout
        -- these are the bid, buyout and stack fields used by Blizzard Auction House
    
        ClickAuctionSellItemButton() -- put item on Auctions Slot
        StartAuction(5000,7500,3) -- create the auction
     end
    

    The numbers 1,2,3,4 appear in the chat window, so the code runs through the loop correctly, but only the 1st item (1 peacebloom) is put up for auction.

    The other three items in the bag are shuffled around, because of the swapping that happens when picking up items when you already have one one the cursor, so it can be seen that they are being picked up, just not having an auction created.

    I've tried looking at other addons, mainly Igors Mass Auction, but it seems to be working in much the same way as my code.

    As usual, any ideas would be great. Thanks again.

    Actually i've been playing around with this a little more, and found the error message : Interface action failed because of an AddOn. Looking at the taint log, I see the AddOn is mine, and that the part that caused the problem was the StartAuction command. I'm still non the wiser, but this may mean something to you.

    It's probably the calls to MoneyInputFrame_SetX. Those probably are spreading the taint, which then gets picked up by StartAuction. I'm not terribly familiar with auction addons.. how do other addons do this sort of thing?

    Ive tried disabling the MoneyInputFrame_Set functions, and changing the auction creating code to read StartAuction(5000,7500,3,1,1), but the same thing happens.

    When I enter each line as a direct command in Wowlua, everything works fine, which leads me to believe that things are happening too fast in my addon. Possibly I need to wait for some event or such, and using /eventtrace I've looked at what events happen after a sucessfull auction creation. There are quite a few of these, and I'd rather not get too bogged-down implementing all these into my addon. Other addons (Igors Mass Auction for one) use the MoneyInputFrame_Set functions, but they also implement delays and look for events, which is starting to get a little too complex for me.

    I'll stick with clicking a button to do each auction separately, rather than doing all auctions with just one click. The way I've implemented it, it actually works quite well and does reduce a lot of time when making lots of auctions.

    Thanks for your suggestions, and for my own peace of mind I will keep working at this to try and solve it. If I get anywhere, I'll repost the solution here.

    Am I reading you right that you're trying to make your addon post multiple auctions of different items all in one click?

    If so, that's no longer possible. I'm not sure which function it is exactly, but I think StartAuction is a protected function now, so it can only be executed once per hardware event. Ditto for the CancelAuction function.

    This was done because if you could position yourself such that you could have the AH and your mailbox open at the same time (used to be possible in Stormwind at the very least), a combination of addons (all addons, no bot programs) could continually scan your auctions, and if anyone posted that item for cheaper, immediately cancel those auctions, retrieve them from the mailbox and repost them cheaper than the lowest current auction, all without user intervention.

    Yes, I'd just about come to the conclusion that what I wanted to do was no longer possible. Thanks for your reply though, it has confirmed my thoughts.