I think it is with the MAF. Problem with a used car is you never really know what happend before you got it. Hey, mine was used too.
Let's think about the quick, cheap fixes. You could replace the TPS for about $25. But, I would think you would get the problem all the time if the TPS was bad. But, it can't hurt and it's a cheap fix. Since you are insistent that it happens when the weather is warm, I am leaning towards an intake related issue such as the MAF. Most likely, the previous owner had the same problem. And, you probably don't have a stock MAF, do you laying around?
Try cleaning the MAF. But be VERY careful. One false move, and the MAF is toast. I don't want to be blamed for anything. But, I have cleaned mine and it worked just fine.
Pull out the MAF from the housing. Don't touch the wires! or set it down. Hold it in you hand to keep it safe. Pour some rubbing alcohol over the sensors. Wait for it to dry completely and put it back into place.
I think you will want to reset you computer by disconecting the battery especially if it is dirty. Wait about 20 minutes which will also ensure that all the alcohol has evaporated. Then start it up and see what happens. A Ford tech told me you can use a q-tip with rubbing alcohol and gently clean the MAF wires too, but you have to be real careful.