Circonian is right, the page offset is 0 based. Requesting offset 1 will return page 2.
You can access the ui elements via
Lua Code:
TRADING_HOUSE.m_browseItems
Item categories are a bit tricky as they change depending on the selected categories, as do the enchantment and trait filter.
I haven't done much with them, except for hiding them.
You get their parent control like this:
Lua Code:
TRADING_HOUSE.m_browseItems:GetNamedChild("ItemCategory")
Your best bet is to look at it with zgoo and check what its children are named. I'll explain how to change the value of a combobox a bit further down.
The price and level are more straight forward.
First get a reference to the common control
Lua Code:
local common = TRADING_HOUSE.m_browseItems:GetNamedChild("Common")
and then access them like this:
Lua Code:
local minPriceBox = common:GetNamedChild("MinPriceBox")
local maxPriceBox = common:GetNamedChild("MaxPriceBox")
local minLevelBox = common:GetNamedChild("MinLevelBox")
local maxLevelBox = common:GetNamedChild("MaxLevelBox")
You can then set their values with :SetText().
The quality selector is a simple combobox and you can control it like this*:
Lua Code:
local qualityControl = common:GetNamedChild("Quality")
local qualityComboBox = ZO_ComboBox_ObjectFromContainer(qualityControl)
qualityComboBox:SetSelectedItem(name) -- name is the label of the entry
*untested. don't kill me if this does not work
Finally you can start the search by calling TRADING_HOUSE.m_search:InternalExecuteSearch() which will apply the set filters.
I could also tell you a few things about setting the sort order and page, but I'll stop here for now
Btw. if you want to be compatible with AwesomeGuildStore it's a whole different story