Prior to owning an iPhone, I had two HTC handsets that ran the Windows Mobile OS. There were a number of applications that allowed you to create profiles that would configure various settings based on events.

I'm curious to know if there is an app for the iPhone where you could customize the power settings based on if you had the phone docked and getting power from an auto charger vs. docked and getting power from AC outlet at home.

For example, I'd want the iPhone to set Auto-Lock to Never when docked in my auto charger in my truck. When removed, I'd want it to go back to Auto-Lock for 1 minute.