macrozilla 
| resources: | Home Mailing List Installation Source Code Screenshots |
|---|
Documentation and Draft Notes
Basic Script ExamplesThe following script is a basic example that will navigate through a list of web sites defined in the array. Note that this version was not working in the MacrozillA project 0.01. In the old version the code was evaluating the contents of the script buffer (textarea) and that does not work completelly because the functions are not registered when using eval. In Macrozilla 0.02 now there is an IFRAME and MacrozillA runs the scripts generating script element in the iframe.
sitelist=new Array();
sitelist[0]="http://www.itaucard.com.br";
sitelist[1]="http://taboca.com";
sitelist[2]="http://www.bb.com.br";
sitelist[3]="http://www.bankboston.com.br";
sitelist[4]="http://www.bradesco.com.br";
ii=0;
function aa() {
parent.parent.__contentDocument.location=sitelist[ii];
if(ii<sitelist.length-1) {
ii++;
setTimeout("aa()",10000+parseInt(Math.random()*20000));
}
}
aa();
Note that this version is using parent.parent in order to access the __contentDocument which is the content of the loaded page in the main browser area. This should be fixed in a further release.