Results 1 to 4 of 4

Thread: wait?

  1. #1
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default wait?

    Hello again, how can i write this in codes?

    Simba Code:
    ClickBank;
    wait until bankscreen;

  2. #2
    Join Date
    Feb 2012
    Posts
    25
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    I codes it like this:

    Simba Code:
    t := GetSystemTime;
      while ( not BankScreen ) do
      begin
        if GetSystemTime - t > 35000 then
        begin
          Writeln('Unable to click the bank!');
          //Logout;
          Exit;
        end;

        ClickBank;

        t2 := GetSystemTime;
        while GetSystemTime - t2 < 6500 do
          if BankScreen then
            Break
          else
            Wait(50 + Random(100));
      end;

    you can remove the inner while loop, if that is already done in your "ClickBank" function

  3. #3
    Join Date
    Oct 2011
    Posts
    805
    Mentioned
    21 Post(s)
    Quoted
    152 Post(s)

    Default

    Simba Code:
    ClickBank;
    repeat
    wait(10);
     until bankscreen

    but if bankscreen doesn't apear ,it will wait in infinite ,so it's wrong. So you should add max waiting time:


    Simba Code:
    var
    t ,maxtime: integer;
    begin
    maxtime := 6000;
    ClickBank;
    t := GetTimeRunning;
    repeat
    wait(10);
    until (bankscreen)or( (GetTimeRunning-t) > maxtime)

    end;

    Or you can make it all in one line:

    Simba Code:
    ClickBank;
    Waitfunc( @bankscreen ,10 ,6000 );
    Last edited by bg5; 03-18-2012 at 02:20 AM.

  4. #4
    Join Date
    Feb 2012
    Posts
    224
    Mentioned
    1 Post(s)
    Quoted
    8 Post(s)

    Default

    kk thanks

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •