Hello.
openitemslot(number slot, string location, bool newWindow)
openitemslot(19, 'red backpack', true)
Opens the 20nd item inside a red backpack. Slot is zero-based, so 1st slot = 0, slot 20 = 19.
Alternatively, you can use based on item id and its index.
openitem(string/number item, string location, bool newWindow, number Index) [void]: Open an item located inside your containers, inventory or ground, depends of your location choice.
openitemslot('blue backpack', 'red backpack', true, 2)
Opens the 3rd blue backpack found on a red backpack.