The improved version in the title is because there already exists an app (please read http://appinventor.googlelabs.com/learn/tutorials/notext/notext.html) on the WEB, you can set a message while you are driving and the message will be automatically sent to the other person.
The improvement I suggest is not to set the message manually, because what if you are not driving and forget to reset your message.
The application will be able to detect rapid changes in your location based on the GPS co-ordinates and should be able to detect if you are driving. Based on your regular movements and your inputs related to the change in locations the application can intelligently find out if you are running or driving.