what sezz says is true. I dont have the trader so I cant test but I highly doubt it works.
The code to do it would look like this ...
Lua Code:
function stock:BAG_UPDATE_DELAYED()
if(not MerchantFrame or not MerchantFrame:IsVisible()) then return end
local bag = 0
while(bag<=NUM_BAG_SLOTS) do
local slot = 1
while(slot<=GetContainerNumSlots(bag)) do
if(C_NewItems.IsNewItem(bag, slot)) then
local item = ItemLocation:CreateFromBagAndSlot(bag, slot)
local itemLink = C_Item.GetItemLink(item)
local itemName, itemLink, itemRarity, itemLevel, itemMinLevel, itemType, itemSubType, itemStackCount, itemEquipLoc, itemTexture, itemSellPrice, itemClassID, itemSubClassID, bindType, expacID, itemSetID, isCraftingReagent = GetItemInfo(itemLink)
-- print(itemName, itemType, itemSubType, itemClassID, itemSubClassID)
if(itemClassID ~= 7) then -- dont sell crafting reagents
UseContainerItem(bag, slot)
end
end
slot = slot + 1
end
bag = bag + 1
end
end