Sign in to follow this  
Followers 0
Renw

Go to url - save text and repeat

5 posts in this topic

Hey,

I'm new here and I'm not sure where to post, I'm sorry if I did it wrong.

Anyway, how can I write a script that does something like this:

Open IE and go to "URL/page-x"

Save text of content in a .txt file.

x+1

Loop

(The txt file should be the same, not a new one each time)

Thanks for help.

 

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

look at the helpfile, and give it a go.

_filecreate
_iecreate
_ienavigate
...look through addtional _ie functions to grab your element, and get it's value
FileWrite
Edited by jdelaney

IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Thanks for your reply.

I've only a question: how can I insert a variable in URL? I mean, if I set the url to navigate as "www.url.com/page-$a", while $a = 1, shouldn't it try to reach "www.url.com/page-$a" instead of ".../page-1" as I want?

Share this post


Link to post
Share on other sites

$iTotalURL = 5
For $i = 1 To $iTotalURL
    ConsoleWrite("http:\someurl\page-" & $i & @CRLF)
Next

output:

http:someurlpage-1

http:someurlpage-2

http:someurlpage-3

http:someurlpage-4

http:someurlpage-5


IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.

Share this post


Link to post
Share on other sites

Thank you very much.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0