mq.delay(2000)
local item = parcelInv:getNextItem()
if item then
if item.Sent == ICONS.MD_CLOUD_DONE then
return
end
status = string.format("Sending: %s", item["Item"].Name())
mq.cmd("/itemnotify in " ..
parcelInv.toPack(item["Item"].ItemSlot()) ..
" " .. parcelInv.toBagSlot(item["Item"].ItemSlot2()) .. " leftmouseup")
if mq.TLO.Window("MerchantWnd").Child("MW_Send_To_Edit").Text() ~= parcelTarget then
status = "Setting Name to send to..."
mq.TLO.Window("MerchantWnd").Child("MW_Send_To_Edit").SetText(parcelTarget)
end
repeat
mq.delay(10)
until mq.TLO.Window("MerchantWnd").Child("MW_Send_Button")() == "TRUE" and mq.TLO.Window("MerchantWnd").Child("MW_Send_Button").Enabled()
item.Sent = ICONS.MD_CLOUD_UPLOAD
mq.cmd("/shift /notify MerchantWnd MW_Send_Button leftmouseup")
item.Sent = ICONS.MD_CLOUD_DONE
else
startParcel = false
status = "Idle..."
parcelInv:resetState()
end