Skip to content
PD
Browser Automation Studio

Script Statistics in BAS

The Script Statistics module in Browser Automation Studio — read the thread number and success/failure counts to drive logic and monitor a running bot.

A running BAS project knows things about itself — which thread is executing, how many runs have worked, how many have failed. The Script Statistics module exposes those numbers so your bot can react to them.

What it reports

The module is used to read statistical indicators of the script’s work:

  • Thread number — the number of the thread currently executing.
  • Successful executions — how many runs have completed as a success.
  • Unsuccessful executions — how many have failed.

These pair with the success/fail verdicts from the Script Logic module — logic sets the outcome, statistics counts it.

The most useful trick: per-thread logic

The standout use is running a scenario only in specific threads. Say you want a step to happen only in threads 2 and 4 — read the thread number and gate it with an IF that matches those numbers. This lets one project behave differently across its parallel workers: some threads do one job, others do another, all from the same flow.

Why it matters

Most bots run many threads at once, and sometimes uniform behaviour isn’t what you want — you need a few threads on a different task, or you want to watch the success rate and stop when failures climb. Script Statistics is the small module that makes a multi-threaded run aware of itself, turning raw parallelism into something you can steer.

FAQ

How do I run logic in a specific thread in BAS?

Read the thread number with the Script Statistics module and branch on it with an IF. For example, to act only in threads 2 and 4, check the thread number and run that branch when it matches.

Can BAS report how many runs succeeded or failed?

Yes. The Script Statistics module exposes the count of successful and unsuccessful executions while the script runs, so you can monitor progress and branch on the numbers.

More on this topic

  • #Browser Automation Studio
  • #BAS
  • #Statistics
  • #Threads
  • #Monitoring

Have an idea? Let’s turn it into a working product.

Skip months of uncertainty. Get a clear architecture, a working MVP and a system you can test, sell and scale.