1. A system for controlling a hardware device of a computer system, comprising: interaction means for interacting with, through a device driver interface, an application running on the computer system; and execution means for executing a driver script for the hardware device, the driver script containing a plurality of programming instructions defining behavior of the hardware device, the programming instructions calling functions of system-provided objects for communicating with and controlling the hardware device, the interaction means programmed for receiving, through the device driver interface, a request from the application for a requested operation by the hardware device, and invoking the execution means to execute the driver script, the execution means interpreting the programming instructions in the driver script and invoking functions of the system-provided objects called by the programming instructions to carry out the requested operation.