Laboratory Notes

Keyword Commands for Application Scripting

Rob Miller
Computer Science and Artificial Intelligence Laboratory

Many modern applications have scripting languages that allow users to automate tasks within the application. Microsoft Word, for example, includes a variant of Basic. For many users, however, the learning curve for writing scripts is prohibitively steep. One of the biggest hurdles is learning the syntax of the language and using it correctly.

Rob Miller and Greg Little (a PhD student in EECS) are developing a new approach that avoids syntax, and focuses instead on the presence of keywords in an expression called a keyword command. Consider the keyword command left margin 2 inches in Microsoft Word. A prototype system can translate this command automatically into Visual Basic, producing ActiveDocument. PageSetup. LeftMargin =InchesToPoints(2).

Rob Miller and Greg Little (a PhD student in EECS) are developing a new approach that avoids syntax, and focuses instead on the presence of keywords in an expression called a keyword command.

Rob Miller and Greg Little (a PhD student in EECS) are developing a new approach that avoids syntax, and focuses instead on the presence of keywords in an expression called a keyword command.

With keyword commands, the user need not worry about strict requirements for punctuation and grammar, and they can be more verbose (set the left margin to 2 inches) or use a different order (2 inches, margin left). In addition, the user does not have to search through documentation to learn the exact name for the LeftMargin property or learn how to access it. A keyword command is in fact a search over the application’s programming interface, but this search produces executable code.

Two keyword command prototypes have been implemented so far: one for Microsoft Word, which translates keyword commands into Visual Basic code, and the other for the Mozilla Firefox web browser, which translates keyword commands into scripts that automatically navigate web pages and interact with web forms. A user study of the web browser prototype found that even with no training, users were able to generate successful keyword commands for 90% of typical web browsing tasks, and that their first attempted keyword command succeeded 73% of the time. Work is underway on a prototype for the Java API.

Pages: 1 2 3 4 5 6

Leave a Reply

Replies which add to the content of this article in the EECS Newsletter are welcome. The Department reserves the right to moderate all comments. If you would like to provide any updated information please send an email to newsletter@eecs.mit.edu.