Hi guys I edited some the script but the state of charging don't work.
here I put my code:
code:
//En la variable web solo poner el dominio sin http:// ni www. //
web = "elliotmoso.com";
metodo = true; //GET=true POST=false
//////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////
bar = 0;
barra = 0;
if(metodo==true){
tipo = "GET";
}else{
tipo = "POST";
}
function OnEvent_Initialize(){
http_request = new ActiveXObject("Msxml2.XMLHTTP");
http_request.open(tipo, "http://www."+web+"/", true);
http_request.onreadystatechange = event;
http_request.send();
}
function OnEvent_Timer(sTimerId){
if(sTimerId == "Recargar"){
http_request = new ActiveXObject("Msxml2.XMLHTTP");
http_request.open(tipo, "http://www."+web+"/", true);
http_request.onreadystatechange = event;
http_request.send();
MsgPlus.AddTimer("Recargar",120000);
}
if(sTimerId == "Cargando"){
if(barra <= 3){
barra = ++bar;
}else{
barra = 0;
bar = 0;
}
MsgPlus.AddTimer("Cargando", 500);
}
}
function event(){
if (http_request.readyState <= 3) {
if (barra==0){
Messenger.MyPersonalMessage = "Cargando [c=3][/c][c=4]████████[/c]";
}else if (barra==1){
Messenger.MyPersonalMessage = "Cargando [c=3]██[/c][c=4]██████[/c]";
}else if (barra==2){
Messenger.MyPersonalMessage = "Cargando [c=3]████[/c][c=4]████[/c]";
}else if (barra==3){
Messenger.MyPersonalMessage = "Cargando [c=3]██████[/c][c=4]██[/c]";
}else if (barra==4){
Messenger.MyPersonalMessage = "Cargando [c=3]████████[/c][c=4][/c]";
}
MsgPlus.AddTimer("Cargando",500);
}else if (http_request.readyState == 4) {
if (http_request.status == 200) {
Messenger.MyPersonalMessage = "[c=3] ● [/c]Estado del Servidor: [c=3] "+ web +": ·> OnLinE[/c]";
}else if (http_request.status == 404 || 503){
Messenger.MyPersonalMessage = "[c=4] ● [/c]Estado del Servidor: [c=4] "+ web +": ·> OfLiNe[/c]";
}else{
Messenger.MyPersonalMessage = "[c=14] ● [/c]Estado del Servidor:[c=14] "+ web +": ·> Estado no Disponible[/c]";
}
MsgPlus.AddTimer("Recargar",120000);
}
}
Thanks, Elliotmoso