TabFocus

opsfafsme

Well-Known Member
Rule The Universe
VIP
Joined
Jul 2, 2018
Messages
243
Reaction score
91
Website
OnlinePiercingShop.com
Achievement
Hi,
recently asked about if the viewer opens additional tabs, how to switch between them.
I want to give an example of a small macro as an example of how to use it.
This macro reads the value from the settings of your site "Max Popups".
It opens exactly as many tabs with your site and sequentially switching between tabs clicks a random link on your site.
Simulated such a chaotic movement of the site. I hope someone will be useful.
Attention! opening additional tabs increases the number of points removed from the balance for visiting your site.
Code:
<i>
</i>
var GMP = await GetMaxPopups();
await WaitForLoading ();
for (var i = 0; i < GMP; i++) {
    await EvaluateScript("window.open('"+ await GetUrl() +"','_blank')");
}
GMP = GMP + 1;
do {
    i = 1;
    do {
        await TabFocus(i);
	await WaitForLoading ();
	await Delay(Random(3000,5000));
        await ClickRandomInternalLink(true);
        i++;
    } while ( i<=GMP )
} while (true)
 

zerar

New Member
VIP
Joined
Jun 9, 2020
Messages
4
Reaction score
0
Achievement
Hi! I tried script and get error:

Please check your script: Uncaught SyntaxError: Unexpected token '<'

What is it mean?
 

zerar

New Member
VIP
Joined
Jun 9, 2020
Messages
4
Reaction score
0
Achievement
And I have another question. Will the call of Click-Under code on any of next clicks work, if I run script with click on Internal link and click on External link on ID of banner in iframe (ClickById) after that? If yes, when Click-Under script will worked? On click on Internal Link or External Link?

Script examle:

- "Main Script" frame

Code:
        await Delay(Random(2000,2500));
        await WaitForLoading();
        do { //scroll
            scrl = Random(3,9);
            for (var i = 1; i < scrl; i++) {
                await EvaluateScript("var ddE = document.documentElement; ddE.scrollTo(0, ddE.clientHeight/(Math.floor(Math.random()*3)+9) + ddE.scrollTop);");
                await Delay(Random(100,150));
            }
            await Delay (Random(2000,2500));
        } while (await EvaluateScript("var ddE = document.documentElement; ddE.clientHeight+ddE.scrollTop < ddE.scrollHeight"))
        await Delay(Random(2000,2500));
        await ClickRandomInternalLink(true);
        await Delay(Random(1000,2000));
await Delay(1000);await ClickById ("myID");
- "Popup Script" frame

Code:
//script run on every opened popup-button
await WaitForLoading();
while(true)
{
    await Delay(Random(15000, 20000));
    await ClickRandomInternalLink();
}
What code I'll must add for click on any link in opened Click-Under window? Or code in "Popup Script" frame enough for that?
 

About us

  • Our community has been around for many years and pride ourselves on offering unbiased, critical discussion among people of all different backgrounds. We are working every day to make sure our community is one of the best.

Quick Navigation

User Menu