iMacros and countdown timer (wait seconds)

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

iMacros and countdown timer (wait seconds)

by a1e1s on Thu Jul 20, 2017 1:06 am

Hi! There is a countdown timer on the page.
I need the code to work if timer = 10h 46m 00s
The timer has the attribute:
TAG POS = 1 TYPE = SPAN ATTR = ID: cdown
Example:
WAIT SECONDS = (TAG POS = 1 TYPE = SPAN ATTR = ID: cdown TXT: 10h 46m 00s)
a1e1s
 
Posts: 2
Joined: Thu Jul 20, 2017 12:42 am

Re: iMacros and countdown timer (wait seconds)

by chivracq on Thu Jul 20, 2017 7:21 am

a1e1s wrote:Hi! There is a countdown timer on the page.
I need the code to work if timer = 10h 46m 00s
The timer has the attribute:
Code: Select all
TAG POS = 1 TYPE = SPAN ATTR = ID: cdown

Example:
Code: Select all
WAIT SECONDS = (TAG POS = 1 TYPE = SPAN ATTR = ID: cdown TXT: 10h 46m 00s)

CIM...! :mrgreen: (Read my Sig...)

You can search the Forum, there is (at least) one exact same/similar Thread already from a few months ago with complete Script(s)... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacros and countdown timer (wait seconds)

by a1e1s on Thu Jul 20, 2017 12:14 pm

chivracq wrote:
a1e1s wrote:Hi! There is a countdown timer on the page.
I need the code to work if timer = 10h 46m 00s
The timer has the attribute:
Code: Select all
TAG POS = 1 TYPE = SPAN ATTR = ID: cdown

Example:
Code: Select all
WAIT SECONDS = (TAG POS = 1 TYPE = SPAN ATTR = ID: cdown TXT: 10h 46m 00s)

CIM...! :mrgreen: (Read my Sig...)

You can search the Forum, there is (at least) one exact same/similar Thread already from a few months ago with complete Script(s)... :idea:


This theme?
viewtopic.php?f=2&t=27347
a1e1s
 
Posts: 2
Joined: Thu Jul 20, 2017 12:42 am

Re: iMacros and countdown timer (wait seconds)

by chivracq on Thu Jul 20, 2017 1:51 pm

a1e1s wrote:This theme?
viewtopic.php?f=2&t=27347

Sorry, answer my Qt's for me to follow up, "CIM" is a Qt... :idea:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacros and countdown timer (wait seconds)

by gUSTAVO on Mon Aug 07, 2017 7:23 am

I have a problem similar to mine it n extracts the clock time and jumps from the error TypeError: window.document.querySelector (...) is null, line 42 (Error code: -991)

Code: Select all
for (;;) {
   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(1.5);
   iimPlayCode(t0+'TAG POS=1 TYPE=SPAN ATTR=ID:clock EXTRACT=TXT');
   var tim = iimGetLastExtract().match(/\d+/);
   if (Number(tim) > 0) {
      weit((Number(tim)*60)+61);
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(2);
      }
gUSTAVO
 
Posts: 5
Joined: Mon Aug 07, 2017 2:21 am

Re: iMacros and countdown timer (wait seconds)

by chivracq on Mon Aug 07, 2017 8:47 pm

gUSTAVO wrote:I have a problem similar to mine it n extracts the clock time and jumps from the error TypeError: window.document.querySelector (...) is null, line 42 (Error code: -991)

Code: Select all
for (;;) {
   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(1.5);
   iimPlayCode(t0+'TAG POS=1 TYPE=SPAN ATTR=ID:clock EXTRACT=TXT');
   var tim = iimGetLastExtract().match(/\d+/);
   if (Number(tim) > 0) {
      weit((Number(tim)*60)+61);
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(2);
      }

Hum, not sure how YOU can have a "problem similar to YOURS"...? :? , sounds grammatically a bit weird @gUSTAVO...

Good that you found this Thread but you should read its Content and my Replies, and apply them to your own Thread, as I didn't even bother to react to your Thread for that very same Reason... :idea:
=> FCIM...! :mrgreen:

Mini-Code Excerpt you post in this Thread doesn't have 42 Lines, so you can better give a direct Link to your own Thread or mention exactly which Line the RuntimeError refers to... :roll:

Hum, and the Code Excerpt you post is completely irrelevant for the RuntimeError you post..., (and your Code is full of Undefined Functions, not to follow...), OK, I guess everybody is wasting their time here...!
You are just "polluting" this current Thread I have the Feeling...
That's maybe a "Tactic" to get some Attention on the Forum, won't work with me if you can't spend 1 min reading the Forum Rules, ah-ah... :roll:
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacros and countdown timer (wait seconds)

by gUSTAVO on Tue Aug 08, 2017 12:11 am

Windows 7 English, Firefox 47, Imacros 8.9.7
can you help ?

I am not a programmer, I just ask for help, because I found the script on the internet. It is working everything right, but when it comes time to extract the clock and wait for the count extracted from the clock it ignores and goes to the next command that is to click on the button.

Code: Select all
var t0='SET !TIMEOUT_STEP 0\n', strings = "" ;
var bit = '338bpyc69ooEUtWvQ64b4VgigAUKgE87mi';

var Faucethub = 0 // Withdrawal para Faucethub, 1 - on, 0 - off.
var FaucetSystem = 0 // Withdrawal para Faucethub, 1 - on, 0 - off.

var surf = 0 // PTCWall Surf, 1 - on., 0 - off.

var Tabs = {
   _browser: function () {
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
         .getService(Components.interfaces.nsIWindowMediator);
      return wm.getMostRecentWindow("navigator:browser").gBrowser;
   }(),
   go: function (tabIndex) {
      this._browser.selectedTab = this._browser.tabContainer.childNodes[tabIndex - 1];
   }
};

var loadFile = function (fileName) {
    var fileDescriptor = imns.FIO.openNode(fileName);
    var text = imns.FIO.readTextFile(fileDescriptor);
    return {
        text: text,
        strings: text.replace(/ /gi, "").split("\r\n")
    };
};

   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/ref/338bpyc69ooEUtWvQ64b4VgigAUKgE87mi'); weit(2);
   var balance = getBalance();
   if (!balance) {
      avtorizacia();
   }
for (;;) {
   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(1.5);
   iimPlayCode(t0+'TAG POS=1 TYPE=SPAN ATTR=ID:clock EXTRACT=HREF');
   var clock = iimGetLastExtract().match(/\d+/);
   if (Number(clock) > 10) {
      weit((Number(clock)*30)+10);
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(2);
      }
   window.document.querySelector('button[type="submit"][id="button"]').click(); weit(5);
   iimPlayCode('TAG POS=1 TYPE=A ATTR=TXT:Claim'); weit(2);
   window.scrollBy(0,100); weit(1);
   iimPlayCode(`
   SET !ENCRYPTION NO
   PROMPT "Resolva o  Captcha (Assim que Terminar Click em Ok):" !VAR1 
   TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
   SET !SINGLESTEP {{!VAR1}}
   SET !SINGLESTEP NO
   `); weit(1);
   window.document.querySelector('button[type="submit"][id="button"]').click(); weit(2);
   if (Number(surf)>=1){ptcwall()};
   var balance = getBalance();
   
   if (Number(balance) > 10000) {
      if (Number (Faucethub) >=1){
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/account');
      window.document.querySelector('button[class="btn btn-sm btn-primary btn-block"][data-toggle="modal"][data-target=".bs-withdraw-modal-lg"]').click(); weit(3);
      window.document.querySelector('input[type="radio"][name="withdraw"][value="FaucetHub.io"][required=""]').click(); weit(1);
   }   iimPlayCode(`
      SET !ENCRYPTION NO
      PROMPT "Resolva o  Captcha (Assim que Terminar Click em Ok):" !VAR1
      TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
      WAIT SECONDS = 2`); weit(1);
      window.document.querySelector('button[type="submit"][id="button"]').click(); weit(2)
   }

   if (Number(balance) > 10000) {
      if (Number (FaucetSystem) >=1){
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/account'); weit(2);
      window.document.querySelector('button[class="btn btn-sm btn-primary btn-block"][data-toggle="modal"][data-target=".bs-withdraw-modal-lg"]').click(); weit(3);
      window.document.querySelector('input[type="radio"][name="withdraw"][value="FaucetSystem.com"][required=""]').click(); weit(1);
   }   iimPlayCode(`WAIT SECONDS = 2
      SET !ENCRYPTION NO
      PROMPT "Resolva o  Captcha (Assim que Terminar Click em Ok):" !VAR1
      TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
      WAIT SECONDS = 2`); weit(1);
      window.document.querySelector('button[type="submit"][id="button"]').click(); weit(2)
   }
   iimDisplay('Seu Saldo e = '+(Number(balance)/100000000).toFixed(8)+' BTC');
   
}

         /***-= Verificando seu Saldo =-***/
function getBalance() {
    iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=CLASS:"panel-body" EXTRACT=TXT');
    var balance = +iimGetExtract().replace(/,/gi, "").match(/\d+/g);
    if (balance !== "#EANF#") {
        return balance;
    }
    return false;
}
   
         /***-= Login =-***/
function avtorizacia() {
   window.document.querySelector('input[type="text"][name="address"]').value=bit;
   iimPlayCode(`
   TAG POS=1 TYPE=A ATTR=TXT:Entrar
   SET !ENCRYPTION NO
   PROMPT "Resolva o Captch (Click em Ok para Continuar):" !VAR1 
   TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
   TAG POS=1 TYPE=BUTTON FORM=ACTION:/ ATTR=ID:button
   `); weit(2);
}

function ptcwall() {
   iimPlayCode('URL GOTO=bitlucky.io/offerwall');
   iimPlayCode('TAG POS=1 TYPE=A ATTR=TXT:PTCWall"');
   iimPlayCode('TAG POS=1 TYPE=A ATTR=TXT:Open<SP>PTCWall<SP>in<SP>new<SP>tab');
   iimPlayCode(t0+'TAG POS=1 TYPE=BUTTON ATTR=TXT:Close');
   for(sqku=1; sqku<=50; sqku++){ iimDisplay('Estou Resolvendo '+sqku+' Aguarde');
   iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=CLASS:ad&&STYLE:"" EXTRACT=HTM');
      if(iimGetExtract().indexOf('EANF')>0 || iimGetExtract().indexOf('onclick')<0) break;
      var claim=iimGetExtract().replace(/&amp;/g,'&').match(/window.*?\);/);
      iimPlayCode('TAG POS=1 TYPE=SPAN ATTR=ONCLICK:'+claim); weit(1);
      if(iimPlayCode(t0+'TAG POS=1 TYPE=H2 ATTR=TXT:Warning')>0){window.close();return;}
      var timerId = window.setInterval(function() { onClick=window.focus();}, 2000);
   for(skz=1; skz<=3000; skz++){
      iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=ID:vnumbers&&STYLE:"" EXTRACT=HTM'); var down=iimGetLastExtract();
      iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=ID:vnumbers&&STYLE:float:* EXTRACT=HTM'); var picture=iimGetLastExtract();
      iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=CLASS:errorbox EXTRACT=HTM'); var error=iimGetLastExtract();
      if(down.indexOf('down picture')>0 || picture.indexOf('down picture')>0 || error.indexOf('Advertisement')>0 || error.indexOf('advertisement')>0) break;}
      if(error.indexOf('Advertisement')>0 || error.indexOf('advertisement')>0){ Tabs.go(2); iimPlayCode('REFRESH'); Tabs.go(3);}
      window.setTimeout(function() { window.clearInterval(timerId);}, 100);
      weit(1.5);
      iimPlayCode('ONDOWNLOAD FOLDER=C:\\Perevernut\\ FILE=b.png WAIT=YES\nTAG POS=1 TYPE=IMG ATTR=SRC:modules.php?* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT');

   var shablon=['be6821c681026e048e86b1308dbb8311','15821c7d43fd9f53a96041603437c4ab','ad5f4d5f8ef29e5d116daa4ecf61853b','2267fd54340d2113d31f47e1a0e81185','2253674278966e65a1f776c8570bf9c6','755093054fa517d3adc008c6892b84b5','6aa801993ebdd5b64b4d65c3b5f7a9d1','830511874dc03cdd0d23f360cf035825','5af11f12e88f81cdd2d6d9dce4454789','64d9969214e7146e52771498a9173bda'];
   crop();
   hashfile();
   try {
   for (i=0; i<strings.length; i++) {
      for (j=0; j<shablon.length; j++) {
         if (strings[i]==shablon[j]) {
            var numer=i+1;
            iimPlayCode('TAG POS=1 TYPE=AREA ATTR=ONCLICK:endprogress('+numer+');&&HREF:javascript:void(0);&&COORDS:*&&SHAPE:rect');
            var timerId = window.setInterval(function() { onClick=window.focus();}, 2000); weit(10); break; //Achei o Captch weit(10);
            }
         }
      }
   } catch(e) {weit(0.5);};
   strings = "";
   window.close();}
   Tabs.go(1);
    iimPlayCode(t0+'TAB CLOSEALLOTHERS');
}

          /***-= Captch =-***/
function crop(){ iimDisplay('Estou Resolvendo '+sqku+' Captcha');
    var Cc=Components.classes, Ci=Components.interfaces, args=['C:\\Perevernut\\crop.vbs'];
    var proc=Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
    var file=Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
    file.initWithPath('C:\\Windows\\System32\\wscript.exe');
    proc.init(file); proc.run(false, args, args.length); weit(3);}

          /***-= Resoluçao do Arquivo Hash =-***/
function hashfile() { iimDisplay("Estou Resolvendo " + sqku + " a soma do Arquivo Hash");
    var Cc = Components.classes, Ci = Components.interfaces, args = ["C:\\Perevernut\\hashfile.vbs"];
        var proc = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
        var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
        file.initWithPath("C:\\Windows\\System32\\wscript.exe");
        proc.init(file); proc.run(false, args, args.length); weit(10);
        try {
         strings = loadFile("C:\\Perevernut\\out.txt").strings;
      } catch(e) {};
iimPlayCode("FILEDELETE NAME=C:\\Perevernut\\out.txt\nFILEDELETE NAME=C:\\Perevernut\\b.png");}

         /***-= Executando Tarefa =-***/
function weit(s) {iimPlayCode("WAIT SECONDS=" + s);}


The error is in this line

Code: Select all
for (;;) {
   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(1.5);
   iimPlayCode(t0+'TAG POS=1 TYPE=SPAN ATTR=ID:clock EXTRACT=HREF');
   var clock = iimGetLastExtract().match(/\d+/);
   if (Number(clock) > 10) {
      weit((Number(clock)*30)+10);
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(2);
      }
   window.document.querySelector('button[type="submit"][id="button"]').click(); weit(5);
Last edited by gUSTAVO on Tue Aug 08, 2017 12:31 am, edited 3 times in total.
gUSTAVO
 
Posts: 5
Joined: Mon Aug 07, 2017 2:21 am

Re: iMacros and countdown timer (wait seconds)

by chivracq on Tue Aug 08, 2017 12:18 am

gUSTAVO wrote:
Code: Select all
(F) CIM = FF 8.9.7, FF54, Windows 7

can you help ?

Code: Select all
var t0='SET !TIMEOUT_STEP 0\n', strings = "" ;
var bit = '338bpyc69ooEUtWvQ64b4VgigAUKgE87mi';

var Faucethub = 0 // Withdrawal para Faucethub, 1 - on, 0 - off.
var FaucetSystem = 0 // Withdrawal para Faucethub, 1 - on, 0 - off.

var surf = 0 // PTCWall Surf, 1 - on., 0 - off.

var Tabs = {
   _browser: function () {
      var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
         .getService(Components.interfaces.nsIWindowMediator);
      return wm.getMostRecentWindow("navigator:browser").gBrowser;
   }(),
   go: function (tabIndex) {
      this._browser.selectedTab = this._browser.tabContainer.childNodes[tabIndex - 1];
   }
};

var loadFile = function (fileName) {
    var fileDescriptor = imns.FIO.openNode(fileName);
    var text = imns.FIO.readTextFile(fileDescriptor);
    return {
        text: text,
        strings: text.replace(/ /gi, "").split("\r\n")
    };
};

   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/ref/338bpyc69ooEUtWvQ64b4VgigAUKgE87mi'); weit(2);
   var balance = getBalance();
   if (!balance) {
      avtorizacia();
   }
for (;;) {
   iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(1.5);
   iimPlayCode(t0+'TAG POS=1 TYPE=SPAN ATTR=ID:clock EXTRACT=HREF');
   var clock = iimGetLastExtract().match(/\d+/);
   if (Number(clock) > 10) {
      weit((Number(clock)*30)+10);
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/faucet'); weit(2);
      }
   window.document.querySelector('button[type="submit"][id="button"]').click(); weit(5);
   iimPlayCode('TAG POS=1 TYPE=A ATTR=TXT:Claim'); weit(2);
   window.scrollBy(0,100); weit(1);
   iimPlayCode(`
   SET !ENCRYPTION NO
   PROMPT "Resolva o  Captcha (Assim que Terminar Click em Ok):" !VAR1 
   TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
   SET !SINGLESTEP {{!VAR1}}
   SET !SINGLESTEP NO
   `); weit(1);
   window.document.querySelector('button[type="submit"][id="button"]').click(); weit(2);
   if (Number(surf)>=1){ptcwall()};
   var balance = getBalance();
   
   if (Number(balance) > 10000) {
      if (Number (Faucethub) >=1){
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/account');
      window.document.querySelector('button[class="btn btn-sm btn-primary btn-block"][data-toggle="modal"][data-target=".bs-withdraw-modal-lg"]').click(); weit(3);
      window.document.querySelector('input[type="radio"][name="withdraw"][value="FaucetHub.io"][required=""]').click(); weit(1);
   }   iimPlayCode(`
      SET !ENCRYPTION NO
      PROMPT "Resolva o  Captcha (Assim que Terminar Click em Ok):" !VAR1
      TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
      WAIT SECONDS = 2`); weit(1);
      window.document.querySelector('button[type="submit"][id="button"]').click(); weit(2)
   }

   if (Number(balance) > 10000) {
      if (Number (FaucetSystem) >=1){
      iimPlayCode('TAB CLOSEALLOTHERS\nURL GOTO=bitlucky.io/account'); weit(2);
      window.document.querySelector('button[class="btn btn-sm btn-primary btn-block"][data-toggle="modal"][data-target=".bs-withdraw-modal-lg"]').click(); weit(3);
      window.document.querySelector('input[type="radio"][name="withdraw"][value="FaucetSystem.com"][required=""]').click(); weit(1);
   }   iimPlayCode(`WAIT SECONDS = 2
      SET !ENCRYPTION NO
      PROMPT "Resolva o  Captcha (Assim que Terminar Click em Ok):" !VAR1
      TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
      WAIT SECONDS = 2`); weit(1);
      window.document.querySelector('button[type="submit"][id="button"]').click(); weit(2)
   }
   iimDisplay('Seu Saldo e = '+(Number(balance)/100000000).toFixed(8)+' BTC');
   
}

         /***-= Verificando seu Saldo =-***/
function getBalance() {
    iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=CLASS:"panel-body" EXTRACT=TXT');
    var balance = +iimGetExtract().replace(/,/gi, "").match(/\d+/g);
    if (balance !== "#EANF#") {
        return balance;
    }
    return false;
}
   
         /***-= Login =-***/
function avtorizacia() {
   window.document.querySelector('input[type="text"][name="address"]').value=bit;
   iimPlayCode(`
   TAG POS=1 TYPE=A ATTR=TXT:Entrar
   SET !ENCRYPTION NO
   PROMPT "Resolva o Captch (Click em Ok para Continuar):" !VAR1 
   TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:adcopy_response CONTENT={{!VAR1}}
   TAG POS=1 TYPE=BUTTON FORM=ACTION:/ ATTR=ID:button
   `); weit(2);
}

function ptcwall() {
   iimPlayCode('URL GOTO=bitlucky.io/offerwall');
   iimPlayCode('TAG POS=1 TYPE=A ATTR=TXT:PTCWall"');
   iimPlayCode('TAG POS=1 TYPE=A ATTR=TXT:Open<SP>PTCWall<SP>in<SP>new<SP>tab');
   iimPlayCode(t0+'TAG POS=1 TYPE=BUTTON ATTR=TXT:Close');
   for(sqku=1; sqku<=50; sqku++){ iimDisplay('Estou Resolvendo '+sqku+' Aguarde');
   iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=CLASS:ad&&STYLE:"" EXTRACT=HTM');
      if(iimGetExtract().indexOf('EANF')>0 || iimGetExtract().indexOf('onclick')<0) break;
      var claim=iimGetExtract().replace(/&amp;/g,'&').match(/window.*?\);/);
      iimPlayCode('TAG POS=1 TYPE=SPAN ATTR=ONCLICK:'+claim); weit(1);
      if(iimPlayCode(t0+'TAG POS=1 TYPE=H2 ATTR=TXT:Warning')>0){window.close();return;}
      var timerId = window.setInterval(function() { onClick=window.focus();}, 2000);
   for(skz=1; skz<=3000; skz++){
      iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=ID:vnumbers&&STYLE:"" EXTRACT=HTM'); var down=iimGetLastExtract();
      iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=ID:vnumbers&&STYLE:float:* EXTRACT=HTM'); var picture=iimGetLastExtract();
      iimPlayCode(t0+'TAG POS=1 TYPE=DIV ATTR=CLASS:errorbox EXTRACT=HTM'); var error=iimGetLastExtract();
      if(down.indexOf('down picture')>0 || picture.indexOf('down picture')>0 || error.indexOf('Advertisement')>0 || error.indexOf('advertisement')>0) break;}
      if(error.indexOf('Advertisement')>0 || error.indexOf('advertisement')>0){ Tabs.go(2); iimPlayCode('REFRESH'); Tabs.go(3);}
      window.setTimeout(function() { window.clearInterval(timerId);}, 100);
      weit(1.5);
      iimPlayCode('ONDOWNLOAD FOLDER=C:\\Perevernut\\ FILE=b.png WAIT=YES\nTAG POS=1 TYPE=IMG ATTR=SRC:modules.php?* CONTENT=EVENT:SAVE_ELEMENT_SCREENSHOT');

   var shablon=['be6821c681026e048e86b1308dbb8311','15821c7d43fd9f53a96041603437c4ab','ad5f4d5f8ef29e5d116daa4ecf61853b','2267fd54340d2113d31f47e1a0e81185','2253674278966e65a1f776c8570bf9c6','755093054fa517d3adc008c6892b84b5','6aa801993ebdd5b64b4d65c3b5f7a9d1','830511874dc03cdd0d23f360cf035825','5af11f12e88f81cdd2d6d9dce4454789','64d9969214e7146e52771498a9173bda'];
   crop();
   hashfile();
   try {
   for (i=0; i<strings.length; i++) {
      for (j=0; j<shablon.length; j++) {
         if (strings[i]==shablon[j]) {
            var numer=i+1;
            iimPlayCode('TAG POS=1 TYPE=AREA ATTR=ONCLICK:endprogress('+numer+');&&HREF:javascript:void(0);&&COORDS:*&&SHAPE:rect');
            var timerId = window.setInterval(function() { onClick=window.focus();}, 2000); weit(10); break; //Achei o Captch weit(10);
            }
         }
      }
   } catch(e) {weit(0.5);};
   strings = "";
   window.close();}
   Tabs.go(1);
    iimPlayCode(t0+'TAB CLOSEALLOTHERS');
}

          /***-= Captch =-***/
function crop(){ iimDisplay('Estou Resolvendo '+sqku+' Captcha');
    var Cc=Components.classes, Ci=Components.interfaces, args=['C:\\Perevernut\\crop.vbs'];
    var proc=Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
    var file=Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
    file.initWithPath('C:\\Windows\\System32\\wscript.exe');
    proc.init(file); proc.run(false, args, args.length); weit(3);}

          /***-= Resoluçao do Arquivo Hash =-***/
function hashfile() { iimDisplay("Estou Resolvendo " + sqku + " a soma do Arquivo Hash");
    var Cc = Components.classes, Ci = Components.interfaces, args = ["C:\\Perevernut\\hashfile.vbs"];
        var proc = Cc["@mozilla.org/process/util;1"].createInstance(Ci.nsIProcess);
        var file = Cc["@mozilla.org/file/local;1"].createInstance(Ci.nsILocalFile);
        file.initWithPath("C:\\Windows\\System32\\wscript.exe");
        proc.init(file); proc.run(false, args, args.length); weit(10);
        try {
         strings = loadFile("C:\\Perevernut\\out.txt").strings;
      } catch(e) {};
iimPlayCode("FILEDELETE NAME=C:\\Perevernut\\out.txt\nFILEDELETE NAME=C:\\Perevernut\\b.png");}

         /***-= Executando Tarefa =-***/
function weit(s) {iimPlayCode("WAIT SECONDS=" + s);}

Ah..., OK for FCI..., but rather post in your own Thread, your Pb has nothing to do with a Timer (at least from the quick "Scan" I gave to your Script in your own Thread, I will have a "real" look once you'll have updated your own Thread correctly...), you are just polluting this current Thread...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6479
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: iMacros and countdown timer (wait seconds)

by gUSTAVO on Tue Aug 08, 2017 3:29 am

I have updated master could look at my topic as soon as possible? And a thousand excuses for having messed up this post
gUSTAVO
 
Posts: 5
Joined: Mon Aug 07, 2017 2:21 am


Return to General Support & Discussions

Who is online

Users browsing this forum: No registered users and 8 guests

-->