Work with shorten sites

daniel

Administrator
Staff member
Joined
Feb 23, 2018
Messages
263
Reaction score
30
Achievement
Hi, In this tutorial, I will show you how to click to an element within a condition, such as I want to click to a skip-button only when it's ready !
If you are new with 9Hits Macros, I recommened to read the basic tutorial here!

Let take a look on an example link from adfly: http://adf.ly/1Qt15t
Please pay attention on the different when the skip-button (skip_bu2tton) is hidden and when it's shown. As you can see, when the button is hidden (the timer still counting), It's has attribute display = "none". And when it's shown, the display="none" was gone.

When it's hidden


When it's shown


Ofc you can find any other different things from the button or event from other element (for exmaple, you may check for the timer. timer counting => still hide, timer stopped => skip button is show). I just want to use the display thing.

So I would like to implement my idea like this

1. Wait for page loaded
2. Check for the display of the skip-button when it's display attribute NOT is "none"
3. Click to the skip-button !

The script should be
Code:
await Delay(1000);
//while browser is still loading, delay for 1s and continue to check
while(await IsLoading())
{
    await Delay(1000);
}

//while the display of the skip_bu2tton still = none, delay for 1s and continue checking
while(await EvaluateScript("skip_bu2tton.style.display") == "none")
{
    await Delay(1000);
}

//If the macros can go here, it's mean the site has been loaded
//and the skip button has been shown

Alert("Skip button is ready !"); //just for test, should be remove in real works

ClickById("skip_bu2tton");
Let testing the script with macro editor ;)
https://youtu.be/fOEQDmiaM6M



You can now click to skip-button without worry about Delay :). For the others, it's the same theory to make macros !
If you need any help, just leave me a comment ;)
Regards!
 

daniel

Administrator
Staff member
Joined
Feb 23, 2018
Messages
263
Reaction score
30
Achievement
MasterDS post_id=44 time=1521090803 user_id=77 said:
I can not make it work, help me please! :cry:
what wrong with you mate, you may hit me on skype
 

MasterDS

New Member
Joined
Mar 15, 2018
Messages
5
Reaction score
1
daniel post_id=52 time=1521600669 user_id=2 said:
MasterDS post_id=44 time=1521090803 user_id=77 said:
I can not make it work, help me please! :cry:
what wrong with you mate, you may hit me on skype
i sent Mp :)
 

younamou1

New Member
Joined
Apr 13, 2018
Messages
3
Reaction score
1
i have the same problem Gabrielthegod55, Im already having apgrade account and i serching for macro shorte.st
 
  • Like
Reactions: josealbitres

daniel

Administrator
Staff member
Joined
Feb 23, 2018
Messages
263
Reaction score
30
Achievement
GabrielTheGod55 post_id=84 time=1522974986 user_id=88 said:
can you help me with a script for another website such as "Shorte.st"?
Hi, the script for shortest already shared

awati Delay(30000);
ClickById("skip_button");
 

daniel

Administrator
Staff member
Joined
Feb 23, 2018
Messages
263
Reaction score
30
Achievement
younamou1 post_id=98 time=1523628354 user_id=94 said:
please help us
You should open Macro Editor to test the script. Also, remember set the duration long enough with your delay.

example I set delay 30s before click

awati Delay(30000);
ClickById("skip_button");

so my duration setting on my site should 35s or longer !
 

baole01s

New Member
Joined
Mar 29, 2018
Messages
4
Reaction score
0
Age
27
Location
Ho Chi Minh
Website
kprint.vn
i want when click on page 1, and then about 80s, it`s continue click anchor text in page 1 to page 2, and finish. and script code google search in here, do you help me, click next page onsite. thank
await Delay(8000);
ClickByXpath(GenerateXpath("input", "type", "text"));
await Delay(3000); //I want to wait a bit before typing
Typing ("in menu");
SendKeyPress(13);
await Delay(5000);
page=1;
while(page <= 6) //asuming we only find up to page 6 of results
{
myTargetXpath = GenerateXpath("a", "href", "https://kprint.vn/%");
foundLink = await GetAttribute(myTargetXpath, "href");
if(foundLink)
{
ClickByXpath(myTargetXpath);
//if found, click to the target and exit the loop by break keyword
break;
}
else
{
//if not found, click to the next button to go to next page
ClickById("pnnext");
await Delay(5000); //wait for a bit to loading next page
page = page+1;
}
}
 

MauroS5

Administrator
Staff member
Rule The Galaxy
Joined
May 10, 2018
Messages
199
Reaction score
15
Location
Spain
Website
9hitspoints.tk
Achievement
Its only me I send traffic and adf.ly dont take it?
I run my macro on the MacroEditor, and it works. ( I got my visit )
But no visit bot
 

rezpector23

New Member
Premium
Joined
Apr 23, 2019
Messages
10
Reaction score
0
Achievement
can you create for this short sites?

http:// suarankri. me/javgnT4b9
 

MauroS5

Administrator
Staff member
Rule The Galaxy
Joined
May 10, 2018
Messages
199
Reaction score
15
Location
Spain
Website
9hitspoints.tk
Achievement
They have a recaptcha
So better try other page or think about use 2captcha
 

netspo

New Member
VIP
Joined
May 1, 2020
Messages
1
Reaction score
0
Achievement
needed macros for the site cat cut (https://catcut.net/)

Actions:
open the page, press the skip button, enter the captcha and confirm (api 2captcha.com)

Throw work for paying the price for the service in a personal
 

amanyx

New Member
VIP
Joined
Dec 1, 2019
Messages
4
Reaction score
0
Achievement
HALLO
I tried the script open ,after he press (skip ad) ,....but come this ,
" Please press 'Allow' to continue "
and stopped...nothing happend ...only popup window come !!!!
please hel^p me to bypass this " Please press 'Allow' to continue " ^and open the shortensite !!!!!

than`ks
 

Naffsky

New Member
Joined
Feb 21, 2021
Messages
1
Reaction score
0
Achievement
set time 150-155

awati Delay(75000);
ClickById("btn");
 

Butenway

New Member
Joined
Dec 28, 2020
Messages
3
Reaction score
0
Achievement
This is working script that gives web2.0 feature and other thing to use as simple pattern
 

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