It maybe "Plausible" to target a specific item within the players stuff, but determining the health of an unequipped item would be difficult.
If Player.GetItemCount Caps001 == 0 Player.AddItem Caps001 100EndIf
Could modify it so it would say for example:
If Player.GetItemCount WeapLaserRifleUnique == 1 ShowHappyMsg endIf
where the game determines if the player has the AER-14 Prototype laser rifle. If the player has it the code will show the message and if not it won't show anything. Beyond that i'm unsure and you may want to look at the script extender to get some more functionality. What are you wanting to do with the code specifically so we can get a better idea of how to help you out?