OpenInventory() For Each cell in GridOfItemsOnScreen If DatabaseOfJunkItemImages.Contains( GetImage(cell) ) Then 'get rid of item SetCursorPos(cell) LeftClick() ClickRecycle() : ClickOK-Yes() Else 'keep the item : do nothing. End If Next CloseInventory()