Working Example Of API 1 Progress Bar Anyone?

I have a function which basically calls 8 button clicks.
Depending on the spec of the computer, I have seen this take as long as 14 seconds to complete.

I would like to show a progress bar but can’t find any working examples for API version 1

document.getElementById("all-together").addEventListener("click", evt => {

document.getElementById("1").click();
document.getElementById("2").click();
document.getElementById("3").click();
document.getElementById("4").click();
//etc etc

})