Interactive tutorials are a very good way to learn about an application. They combine the benefits of reading documentation with the benefits of experimenting oneself. However, they don't exist except in some games.
A generic library could be developed to fill that gap. Application developers may also extend the library if the base implementation doesn't suit their needs.
Each tutorial would be stored in a script that would be executed by an interpreter. The interpreter would react to user actions as stated in the script.
Even when there are still better ways to learn how to do something (for example, a friend in front of the computer explaining it), interactive tutorials may be very useful for people who can't resort to those better ways.