I would like to have a Lua script sell some specific items for me. Going through the documentation on https://www.redguides.com/docs/projects/macroquest/reference/data-types/datatype-merchant/ and more specifically https://www.redguides.com/docs/projects/macroquest/reference/commands/selectitem/, I am using the following method to select an item from the players inventory to sell:
[CODE lang="Lua" title="SelectItem Usage"]mq.cmd('/selectitem "=Vinegar"');[/CODE]
based on the documentation in the Command wiki:
But I get the Following message in the MQ console:
it does work without the '=' in the argument, but that does a partial match and is sometimes selecting the wrong item if it happens to contain the full name of another item. I.E 'Banded Mail' and 'Large Banded Mail'.
Is there another way to accomplish selecting an item from the player's inventory by an exact match to sell to a merchant? Or is there something I am not doing correctly in Lua? Here is a screenshot of my inventory with the Vinegar item while the script is running and giving me the error above:

[CODE lang="Lua" title="SelectItem Usage"]mq.cmd('/selectitem "=Vinegar"');[/CODE]
based on the documentation in the Command wiki:
Selects items in your inventory when you have a merchant open. Partial match accepted, /selectitem "bottle of" will select a "bottle of vinegar". Exact match also accepted, /selectitem "=bottle of vinegar".
But I get the Following message in the MQ console:
/selectitem Could NOT find =Vinegar in your inventory to select.
Use /invoke ${Merchant.SelectItem[=Vinegar]} if you want to select an item in the merchants inventory.
it does work without the '=' in the argument, but that does a partial match and is sometimes selecting the wrong item if it happens to contain the full name of another item. I.E 'Banded Mail' and 'Large Banded Mail'.
Is there another way to accomplish selecting an item from the player's inventory by an exact match to sell to a merchant? Or is there something I am not doing correctly in Lua? Here is a screenshot of my inventory with the Vinegar item while the script is running and giving me the error above:


