viernes, 5 de enero de 2018

Método Randow JavaScript, Google Earth (Versión 2)

for (cont=0;cont<=30;cont++) 
{
var WshShell = WScript.CreateObject("WScript.Shell");
WshShell.AppActivate ("Google Earth");
WScript.Sleep ("2000");
WshShell.Sendkeys ("{TAB}");
var cor1=Math.floor(Math.random()* 40);
var cor2=Math.floor(Math.random()* 50);
var cor3=Math.floor(Math.random()* 50);
var cor4=Math.floor(Math.random()* 50);
var cor5=Math.floor(Math.random()* 50);
var cor6=Math.floor(Math.random()* 50);
WshShell.Sendkeys (""+cor1+"°"+cor2+"'"+cor3+", "+cor4+"° "+cor5+"'"+cor6+"");
WScript.Sleep ("2000");
WshShell.sendkeys ("~");
WScript.Sleep ("10000");
WshShell.Sendkeys ("^(%s)");
WScript.Sleep ("7000");
x1 = new ActiveXObject("WScript.Shell");
x1.Run("mause1.ahk");
WScript.Sleep ("6000");
WshShell.Sendkeys (""+cont+"-"+cor1+"°"+cor2+"'"+cor3+",");
WScript.Sleep ("2000");
WshShell.Sendkeys (""+cor4+"° "+cor5+"'"+cor6+"");
WScript.sleep ("3000");
WshShell.Sendkeys ("~")
WScript.Sleep ("3000");
x2 = new ActiveXObject("WScript.Shell");
x2.Run("mause2.ahk");
WScript.Sleep ("4000");
WshShell.sendkeys ("+({TAB})");
WScript.Sleep ("2000");
if (cont==7) {
VoiceObj = new ActiveXObject("Sapi.SpVoice");
VoiceObj.Speak("intermedio");
WScript.sleep ("9000");
}
}
WScript.echo("El proceso ha finalizado")



No hay comentarios:

Publicar un comentario