I'm running Windows 7, and I want it to display a password prompt when I lock my screen, as is normal. However, I want to have a script/service that somehow logs me in when it's invoked via an external hardware device (for example, a listener detects an RFID card touch and invokes the script, or an iPhone sends a command to a listener server and it invokes the script). A script that would store my username/password in plaintext is okay.
(I don't need this functionality at startup or the very first time I login, I only need it after I've already logged in and I lock my screen.)
Is it possible to create such a script? If so, could you point me to an existing solution or a starting point for building one myself?
I do understand the security implications of what I'm asking for, but I still want answers to my question as presented.