Thanks for being dense on purpose. The task is closely related to creating you own programming language, the means you would use to do that is not available in applescript. That is the adequate, practical, realistic and sane answer. Moreover, something being theoretically possible does not equal humanly possible, for example implement Windows Vista (~50 million lines of code) with nothing but switches .