This part is intended to select login items only (and exclude secure notes, credit cards, etc.).
@Bill_Morgan is undoubtedly a stronger PS programmer than both of us, so you may want to use his script as a starting point for further experimenting.
Good luck, and let is know how it goes.