1. A method for emulating a sequence of actions performed by a user when interacting with a computer aided design (CAD) application, comprising: parsing a first instruction including a context prefix and a context block expression, wherein the context prefix specifies one or more contexts and the context block expression specifies one or more operations to perform with respect to one or more graphics components; parsing a first context of the context prefix into a first user input mode and a first operational state associated with the first user input mode; parsing a second context of the context prefix into a second user input mode and a second operational state associated with the second user input mode; setting the CAD application to operate using the first user input mode and the first operational state; executing the one or more operations specified by the context block expression using the first user input mode and the first operational state; setting the CAD application to operate using the second user input mode and the second operational state; and executing the one or more operations specified by the context block expression using the second user input mode and the second operational state.