I don't want to load a page, need help

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
Teriaaa
Posts: 5
Joined: Thu Feb 25, 2016 1:24 pm

I don't want to load a page, need help

Post by Teriaaa » Thu Feb 25, 2016 1:40 pm

Hello and sorry for my bad english.
So i use imacro to delete spam in a website where i am modeartor, but the thing is, the page i'm using , is VERY LONG to load depending of the spammer
http://www.noelshack.com/2016-08-145640 ... nspram.png

And my macro is working like this :

SET !ERRORIGNORE YES
URL GOTO=http://www.xxxxxx.com/search_messages=xxxxxxxx
CLICK X=54 Y=15
CLICK X=667 Y=355
WAIT SECONDS=0.5

it's click on the first link, delete the spam and go back to the long page.

Of course it's looping so i have to reload that damn page every time, and its so anoying, does anyone know how to NOT completely load the page, at least, load what i'm seeing, because i dont need to go down on that page !

Thanks and again sorry for my bad english
IrishMacro
Posts: 135
Joined: Wed Nov 03, 2010 12:27 pm

Re: I don't want to load a page, need help

Post by IrishMacro » Thu Feb 25, 2016 4:33 pm

I would suggest not using XY coordinates.

Instead search for the first occurrence of the spam by href and delete spam

SET !ERRORIGNORE YES
URL GOTO=http://www.xxxxxx.com/search_messages=xxxxxxxx
TAG POS=1 TYPE=* ATTR=HREF:*www.linktospam.com/blah*
do the delete


Could this work for you?
Firefox free plugin, last version
Win7
Teriaaa
Posts: 5
Joined: Thu Feb 25, 2016 1:24 pm

Re: I don't want to load a page, need help

Post by Teriaaa » Thu Feb 25, 2016 5:37 pm

Thanks for the answer IrishMacro :)

I tried Href but it still need to load http://www.xxxxxx.com/search_messages=xxxxxxxx

I have also another idea, maybe i should just try to find a way to click on the first blue link and open it
http://image.noelshack.com/fichiers/201 ... e-1111.png
then i delete the spam
http://www.noelshack.com/2016-08-1456420333-delete.png
, then hit the back button to go to the page where there is all the spam without loading
http://image.noelshack.com/fichiers/201 ... -spamm.png
then click on the second link and delete, etc ...

So, i tried something with Tab who can select the next link like this :

SET !ERRORIGNORE YES
VERSION BUILD=8961227 RECORDER=FX
TAB T=1
EVENT TYPE=KEYPRESS SELECTOR="HTML" KEY=9 (TAB)
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2>A" KEY=13 (ENTER)
CLICK X=667 Y=355 (DELETE) ( Yes i use X/Y because the delete button have differents links )
WAIT SECONDS=0.5
BACK

But it doesnt work, it still stuck at the first link

when i try with multiple tabs on the page with all the spam, i got this
EVENT TYPE=KEYPRESS SELECTOR="HTML" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2>A" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2:nth-of-type(2)>A" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2:nth-of-type(3)>A" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2:nth-of-type(4)>A" KEY=9

So i think than i miss something with those tabs ..
chivracq
Posts: 9368
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: I don't want to load a page, need help

Post by chivracq » Thu Feb 25, 2016 8:09 pm

Ah OK, good, 'IrishMacro' on the Case..., FCIM otherwise for me to have a look if you are still stuck... :idea:
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
Teriaaa
Posts: 5
Joined: Thu Feb 25, 2016 1:24 pm

Re: I don't want to load a page, need help

Post by Teriaaa » Sat Feb 27, 2016 12:51 am

I still need help lol
chivracq
Posts: 9368
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: I don't want to load a page, need help

Post by chivracq » Sat Feb 27, 2016 9:48 am

Teriaaa wrote:I still need help lol
OK, lol...!
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE').
- I don't even read the Qt if that (required) Info is not mentioned...!
- Script & URL help a lot for more "educated" Help...
IrishMacro
Posts: 135
Joined: Wed Nov 03, 2010 12:27 pm

Re: I don't want to load a page, need help

Post by IrishMacro » Sat Feb 27, 2016 2:59 pm

Lololol

There are two way you can handle it. Either set the web browser to open new link in a new tab, go to new tab and do your delete, then close tab.

Open main page
click link to open it in a new tab
Switch to TAB=2
Do the delete
Switch back to TAB=1
TAB CLOSEALLOTHERS
Click next link to start again

Or just reload the main page, imacros is doing everything for you, I don't see how this can be an issue then.
Firefox free plugin, last version
Win7
Teriaaa
Posts: 5
Joined: Thu Feb 25, 2016 1:24 pm

Re: I don't want to load a page, need help

Post by Teriaaa » Sat Feb 27, 2016 4:16 pm

Open main page
click link to open it in a new tab
Switch to TAB=2
Do the delete
Switch back to TAB=1
TAB CLOSEALLOTHERS
Click next link to start again

But all the link on this page are different and imacro record specifik link so i can't loop this!
So i need to use X/Y position but again, the position of the link are in different location depending on how long the message is :(

So i tried the solution with TAB

I press my key TAB to select the first link which give =
EVENT TYPE=KEYPRESS SELECTOR="HTML" KEY=9
then i press ENTER =
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2>A" KEY=13
Then i delete the comment with the button who never change position =
CLICK X=667 Y=355
Then i use my Back button to go to the main page

The first link on the main page is still selected, the main page isnt reloaded and i DONT WANT to reload it because it take like 2 MINUTES to load because of the massive spam !
So because the first link is still selected, i was thinking than imacro will use the command EVENT TYPE=KEYPRESS SELECTOR="HTML" KEY=9 (TAB) to press tab and select the next link but it doesnt !

And when i press tab manually, i also have
EVENT TYPE=KEYPRESS SELECTOR="HTML" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2>A" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2:nth-of-type(2)>A" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2:nth-of-type(3)>A" KEY=9
EVENT TYPE=KEYPRESS SELECTOR="HTML>BODY>H2:nth-of-type(4)>A" KEY=9
so maybe the solution is here, i have to find a way to make those line in one line i think ..
Teriaaa
Posts: 5
Joined: Thu Feb 25, 2016 1:24 pm

Re: I don't want to load a page, need help

Post by Teriaaa » Sun Feb 28, 2016 12:20 pm

chivracq wrote:Ah OK, good, 'IrishMacro' on the Case..., FCIM otherwise for me to have a look if you are still stuck... :idea:
Oh i'm sorry, i'm now undestanding what you're talking about, maybe you need this ?
VERSION BUILD=8961227
Windows 7 (French)
Firefox 44.0.2
Post Reply