I've been thinking about this for the last couple of weeks, and I've finally got around to putting together a proof of concept.
As far as OOP goes, Javascript is a pretty damn good language -- very flexible, but lets look at some code. Here is a two button form for AutoIt written in Javascript.
var $=this;
var hgui;
this.MsgHandler_=function (m){
if (m==$.AutoIt.GUI_EVENT_CLOSE) {
$.AutoIt.GUIDelete(hgui);
return true;
}else if (m==button1) {
$.AutoIt.Run("notepad.exe");
}else if (m==button2) {
alert('Thanks from a javascript alert box!');
}
return false;
}
var bu