Well the first step is to write out the grammar for your script. How complicated you make this is up to you.
Say
Code:
window <title> [,<position]
open <address|url>
open and window are keywords
window has a title, and an optional position
open has an address or a URL
A simple line-oriented parser (one keyword and associated parameters per line) is simple enough to roll your own parser. But anything complex (say loops, block structure, variables, functions, ...) you'd probably be looking at lex and yacc (or flex and bison)
http://www.bloodshed.net/compilers/index.html#toolkits