If statement to check for run error?

  • Hello, this is my first time using the "if" portion of BAS. I would like to have an IF statement that checks if their is a run error, such as "Failed to wait for element >CSS>>" etc.. and if there is this error, it removes a certain line from a text file.

    Basically, I have a text file called accounts.txt with usernames and my script will try to login to these, I want it to be able to delete the lines/accounts where the login was unsuccessful.

    What would be the best way to go about this? Thanks

  • @spockthe40oz Hi, BAS does that automatically, if you check this option


    It works like this. If you fail to login, than thread will stop with error, new thread will be started with next account.
    Meanwhile with this option BAS will also delete line automatically after thread fail.

    But you can also do that manually if you want.


    You may also want to check ignore error and if interactive documentation which contiain a lot of usefull info.

  • Hello, thanks for the reply.

    I want to make it to where it counts the errorsand let's say when it reaches 10 it visits a certain URL link..
    How do I increase a variable by +1 every time?

    Also, would this be a correct if statement for... if {{var}} == 10


Log in to reply

  • 3
  • 3
  • 2
  • 1
  • 8
  • 2
  • 5
  • 7