Jump to content

How to get image from IE?


Recommended Posts

Heh.. comic downloaders are great things to learn how to use AutoIT.

But there are different ways to think about the logic here, look, over the pages source code, do any of the following ring true, can you:

A: view a directory containing all of the image files?

B: are all of the image files named in sequence (01.jpg, 02.jpg etc etc)

C: Are all of the files in the SAME directory (http://comic.com/images/ -> 01.jpg, 02.jpg)

etc

i always worked with those which match options B and C, so i could assume a directory, and a name, then just churn those out via for loops.

However, on some pages i created Regular expressions to identify the URL to the image from the HTML code of the page (these were a pain)

Perhaps one option is to download them all, and then use FileGetSize to find and keep only the largest !! (or can you get the file size before downloading? and save bandwidth?)

Edited by tAKTelapis
Link to comment
Share on other sites

Check out this image downloader in the Snippet database: http://quadryders.com/phpcc/snippet.php?sid=56

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

Link to comment
Share on other sites

Well I have a similar problem but I must use the right click menu to download an image on a web page. I looked at just calling the right click function but it requires x,y coordinates. If my ie window is moved or otherwise messed up, the image won't be clicked on.

The reason I must use the right click save as function is because the web server dynamically generates the image, there is no source image url to go to. The image is created, displayed, deleted. I have no control over this but I need to download the image.

How would I go about this? Or where can I look for information on how to go about this?

Link to comment
Share on other sites

Well I have a similar problem but I must use the right click menu to download an image on a web page. I looked at just calling the right click function but it requires x,y coordinates. If my ie window is moved or otherwise messed up, the image won't be clicked on.

The reason I must use the right click save as function is because the web server dynamically generates the image, there is no source image url to go to. The image is created, displayed, deleted. I have no control over this but I need to download the image.

How would I go about this? Or where can I look for information on how to go about this?

This post should get you going to get coordinates: http://www.autoitscript.com/forum/index.ph...;hl=coordinates

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

Link to comment
Share on other sites

Worked wonders thank you! Used that code to move to the picture, sent a right click.

Then I fell back to less complicated measures and sent s for save and sent enter to open the dialog. etc...

Thank you!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...