Will appologize now for the long story........

Ok, left work saturday everything was fine with the truck. Today go to take off for some errands with the girlfriend and it wouldn't start at first. Turn the key and click, like a dead battery. Tried again and it slowly turns over and then starts. Couple more starts with similar results. Was running fine so we headed down the road to get a bite to eat. When leaving it did the same thing, though threw codes (3, all relating to the TPS), flashed reduced engine power on the cluster and the radio got reset. But there was no throttle response at all and the idle was high and rough. So I called my dad to get a tow home, wasn't going to be far. Get it back home and after it sat for a minutes while reclearing DTCs it fires right up like nothing happened. No codes, idles normal, throttle response is back. Several restartes and it didn't act up again. Leave again for planned errands with no trouble, except when exiting the truck and hitting the lock/arm on the alarm. It wasn't responding, the remote just beeped like it was out of range. So manually locking the doors worked fine. Got home and disconnected the battery for a few minutes, reconnected and the truck works fine. Alarm works normally, truck starts fine, runs great.

I'm just wondering what caused the sudden 'glitch' to come and go. Have had no problems in 2+ years and out of the blue this hits. Hopefully it doesn't mean more problems will soon come.

But anyone have any ideas or thoughts???