if you got a idem, you will interact with door. not with clicking on it with the key on your cursor.
EXAMPLE: I cant leave without my cardkey.
how did you do it?
if (player.HasInventory(iCardkey)) ...
else Display("I can't leave without my card key.");
Please, RTFM. This forum is for when you have exhausted all other available resources. We are not here to hold your hand through basic stuff that is explained plainly in the manual.
Finding specific stuff can be hard, that's why you're supposed to read through the scripting section once or twice.