There's also a fairly thorough example in the script Vault on how to collect inventory data. You might find some or all of it useful.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D