1. A method for generating scripts in a computer system, comprising: providing a user interface for enabling a user to perform user actions using said user interface to perform a user task; monitoring said user actions by said computer system; determining system operating environment information in accordance with said user actions; generating a script in accordance with said user actions and said determined system operating environment information for repeating said user task using said script generated in accordance with said determined system operating environment information, wherein said generating a script includes: creating a query using a combination of data representing said user actions and said determined system operating environment information and determining a plurality of previously generated scripts associated with the monitored user actions based on said query, wherein previously generated scripts are stored in a data repository; analyzing said monitored user actions; selecting a most efficient script from the plurality of previously generated scripts; and updating the selected, most efficient script responsive to the monitored user actions.