Sign in to follow this  
Followers 0
rudi

process IE URL links starting from "last one klicked"

5 posts in this topic

Hello,

reading through the autoit3 documentation I have no clue how to handle this. Reading through the docs of the current beta, too: :D I expect, that it can be done with the new _IE... functions? (_IEClickByText, _IEClickByIndex). Up to now I have only done scripting for CMD/BAT, so honestly from the docs I have no clue how to start. :P

:D May be somebody :) can give me some examples or just hints howto do the following: :party:

from a website I download quite a bunch of files once per month (www.winhelpline.info). I'd like to do so without the need to do several clicks per update, especially this annoying "Authentic" check at M$.

The main page is this one:

http://www.winhelpline.info/forum/winhelpl...-09-2006-a.html

1.) From the middle of the of the page (below the line "Auf dieser Seite finden sich alle Optionalen Updates für den ...") I'd like to download all the updates. These are behind the links labeled "download". So first step would be to click all the links from there to the bottom labled "download"

2.) All of them put you to a redirection site to support the winhelpline team (banner clicks)

(randomly clicking some banners by autoit these, wait 10 seconds and close the new windows would be a fair thing IMHO). So some banners and the "HERE" will need to be clicked here.

3.1)

Many of them do direct downloads: these need to be saved directly to disk

3.2)

Others go to Microsoft "Authentic Windows Verification required"

3.2.1)

from these others one part after the verification goes plain to the download. Save to disk

3.2.2)

Others have after this /nice/ "authentic" check a download button pointing to these 3 links, below in the same document: licence, documentation, <download file>

4.) The Save Dialog needs to check for duplicate file names before saving: Currently it's just 2 files with duplicate file names that need to be unique-fied: .NET Framework 2.0 and it's language pack have the same names as the 1.0 version, needs to be renamed to "dotnetfx2.exe" and "langpack2.exe". Might be it will be more in future...

Any suggestions or examples how to do so :party: appreciated, :alien:

best regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites



This is a VERY ambitous project if you are starting from scratch. This will require not only AutoIt and IE.au3 knowledge, but also the ability to tear the HTML pages apart and figure out what is behind them.

I suggest you start with some simpler goals and work your way up or break this project down into small steps and work through them one at a time.

Please work through the examples in the helpfile and look at big_daddy's snippet database.

Here is the first step:

#include <IE.au3>
$url = "http://www.winhelpline.info/forum/winhelpline-postservice-pack-updater/106287-windows-xp-update-pack-v17-09-2006-a.html"
$oIE = _IECreate($url)

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

This is a VERY ambitous project if you are starting from scratch. This will require not only AutoIt and IE.au3 knowledge, but also the ability to tear the HTML pages apart and figure out what is behind them.

:D Hm, basically I first thought to 1.) pass by the redirection page and 2.) to get rid of this annoying M$ validity check for the majority of the downloads.

I suggest you start with some simpler goals and work your way up or break this project down into small steps and work through them one at a time.

Please work through the examples in the helpfile and look at big_daddy's snippet database.

The examples for this _IE... stuff I *did* read through, but I didn't get too much :P ....

Most of them is just 2 lines of code. And the IE.AU3 ist THAT huge, oh man... :">

ehm... <shame>, where is this snippet database?

Here is the first step:

#include <IE.au3>
$url = "http://www.winhelpline.info/forum/winhelpline-postservice-pack-updater/106287-windows-xp-update-pack-v17-09-2006-a.html"
$oIE = _IECreate($url)

Dale

The opening of the IE Window I had already understood.

But the rest is too tough to me.

Sorry, that I initally asked fo a too complex thing in once. Basically I was wondering how to get the URL of the address edit of IE to clipboard, remove the redirection and to repaste it there, then press enter.

By searching how to do so I came across IE.AU3, that looked so powerful, that it made me thinking about doing *ALL* the work automatic. The small jump was too fast :) , as you told me ...

So I want to ask in small steps:

1.) how to get the number of frames of an IE Window, that is *ALREADY* open? (so not using this _IECreate($url)) and how to address them later on?

I guess this might be done with _IEFrameGetCollection?

2.) how to get the list of links in each frame? I guess this has to be done with _IEFrameGetCollection, _IEFrameGetObjByName, _IELinkGetCollection?

3.) following links is done with _IELinkClickByIndex or _IELinkClickByText ? :D

4.) is it possible to find out, *WHICH* link was klicked latest? And then to start from there with the remaining links in that frame? (no clue at all)

And a general question: with the IE.AU3 all the stuff starts with _IE... , is that just during the beta time? And all the examples use $o... variables: Is there a certain reason this was done?

Thank you very much for your answer,

regards, Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

ehm... <shame>, where is this snippet database?

The opening of the IE Window I had already understood.

Sorry, you gave me no way to know this. Re: snippet, search for forum or find a post by big_daddy -- it is in his sig.

1.) how to get the number of frames of an IE Window, that is *ALREADY* open? (so not using this _IECreate($url)) and how to address them later on?

I guess this might be done with _IEFrameGetCollection?

Correct

2.) how to get the list of links in each frame? I guess this has to be done with _IEFrameGetCollection, _IEFrameGetObjByName, _IELinkGetCollection?

Correct

3.) following links is done with _IELinkClickByIndex or _IELinkClickByText ? :)

Correct

4.) is it possible to find out, *WHICH* link was klicked latest? And then to start from there with the remaining links in that frame? (no clue at all)

Not really... night be able to do something with ObjEvent, that that requires a lot more understanding.

And a general question: with the IE.AU3 all the stuff starts with _IE... , is that just during the beta time? And all the examples use $o... variables: Is there a certain reason this was done?

Those are accepted naming convetions for UDFs. That is how they will stay.

Thank you very much for your answer,

regards, Rudi.

You're welcome

Dale

Edited by DaleHohm

Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


Link to post
Share on other sites

4.) is it possible to find out, *WHICH* link was klicked latest? And then to start from there with the remaining links in that frame? (no clue at all)

I would suggest creating an array of all the links, then navigate to them one at a time.

And a general question: with the IE.AU3 all the stuff starts with _IE... , is that just during the beta time? And all the examples use $o... variables: Is there a certain reason this was done?

This makes reading your code much easier, because at a glance you can tell what the datatype of the variable is. This link should help you better understand.

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