strate Posted September 5, 2006 Share Posted September 5, 2006 I'm trying to simplify the process to get DVD covers and for the life of me can not figure out how to save the image. The site is Cdcovers.cc. This is my first time trying the IE.au3 and tried example I've found while searching for a fix to this. I've decided to work this out in reverse creating functions for each step as I go, and of course I'm stuck already. Source is attached since i seen it was commonly used to resolve these problems. _IEImgClick was working for me (wasn't erroring anyways). Can you make this do a right click?Source.txt INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 (edited) ok here it is _IEImgGetCollection check the beta help file for examples Edited September 5, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
lod3n Posted September 5, 2006 Share Posted September 5, 2006 (edited) DaleHohm posted a nifty IE image downloader: http://www.autoitscript.com/forum/index.ph...owtopic=29053#4 Edited September 5, 2006 by lod3n [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
strate Posted September 5, 2006 Author Share Posted September 5, 2006 Both do not work, I already tried them. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 (edited) EDIT i see nvm, could you please post your code, so i dont have to write my own to navigate to the page Edited September 5, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
lod3n Posted September 5, 2006 Share Posted September 5, 2006 That site looks hard to automate. Amazon is much eaiser. Also there is this nifty program that will do it for you:http://www.snapfiles.com/reviews/amazon-co...amzcoverdl.html [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 (edited) Modded for every connection no sleep now parses the source for the image link #include <IE.au3> $IE = _IECreate("http://www.cdcovers.cc/dvd_a.php") _IELoadWait($IE) $Form = _IEFormGetObjByName($IE,"download") $list = _IEFormElementGetObjByName($Form,"titleList") _IEFormElementOptionselect($list,"A Bear Named Winnie",1,"byText") _IELinkClickByText($IE,"Front") $submit = _IEFormElementGetObjByName($Form,"submit") _IEAction($submit, "click") _IELoadWait($IE) $source = _IEDocReadHTML($IE) $split = StringSplit(StringTrimLeft(StringTrimLeft($source,StringInStr($source,"<script language=Javascript>window.onload=setTimeout('document.the_cover.src=")),StringLen("<script language=Javascript>window.onload=setTimeout('document.the_cover.src=")),'"') MsgBox(0,"Picture Found","The Picture has been found") InetGet($split[1],FileSaveDialog("Save Picture","","Jpeg (*.jpeg)")) Edited September 5, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
strate Posted September 5, 2006 Author Share Posted September 5, 2006 How can it be made to select the first letter of the name for between$list = _IEFormElementGetObjByName($Form,"titleList") _IEFormElementOptionselect($list,"The Last Samurai",1,"byText")/ Thank you! INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 How can it be made to select the first letter of the name for between$list = _IEFormElementGetObjByName($Form,"titleList") _IEFormElementOptionselect($list,"The Last Samurai",1,"byText")/ Thank you! could u eloborate on that got me lost Link to comment Share on other sites More sharing options...
strate Posted September 5, 2006 Author Share Posted September 5, 2006 If you search another movie that the title doesn't start with an "A" then it errors out. Just above the listbox is a bar that has the alpha selections INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 because im nice and am bored out of my mind with nothing better to do ill write everything just for you how about it just give me a lil while to work everything out Link to comment Share on other sites More sharing options...
strate Posted September 5, 2006 Author Share Posted September 5, 2006 because im nice and am bored out of my mind with nothing better to do ill write everything just for you how about it just give me a lil while to work everything outI didn't ask for that. INI TreeViewA bus station is where a bus stops, a train station is where a train stops. Onmy desk I have a work station... Link to comment Share on other sites More sharing options...
lod3n Posted September 5, 2006 Share Posted September 5, 2006 This should take you to the correct page for the title you're searching for #include <IE.au3> $title = "A Bear Named Winnie" $firstletter = StringLower(stringleft($title,1)) $IE = _IECreate("http://www.cdcovers.cc/dvd_"&$firstletter&".php") _IELoadWait($IE) $Form = _IEFormGetObjByName($IE,"download") $list = _IEFormElementGetObjByName($Form,"titleList") _IEFormElementOptionselect($list,$title,1,"byText") _IELinkClickByText($IE,"Front") $submit = _IEFormElementGetObjByName($Form,"submit") _IEAction($submit, "click") _IELoadWait($IE) $source = _IEDocReadHTML($IE) $split = StringSplit(StringTrimLeft(StringTrimLeft($source,StringInStr($source,"<script language=Javascript>window.onload=setTimeout('document.the_cover.src=")),StringLen("<script language=Javascript>window.onload=setTimeout('document.the_cover.src=")),'"') MsgBox(0,"Picture Found","The Picture has been found") InetGet($split[1],FileSaveDialog("Save Picture","","Jpeg (*.jpeg)")) [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 (edited) here we go expandcollapse popup#include <IE.au3> #include <GUIConstants.au3> ; == GUI generated with Koda == $Form1 = GUICreate("Cover Downloader", 266, 60, 192, 125) GUICtrlCreateLabel("Movie Title", 8, 8, 56, 17) $title = GUICtrlCreateInput("", 72, 8, 97, 21) $status = GUICtrlCreateLabel("Status : Waiting", 80, 32, 100, 17) $download = GUICtrlCreateButton("Download", 184, 8, 73, 17, 0) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Select Case $msg = $download $movie = GUICtrlRead($title) ; just storing it in a variable for purposes unkown :) If $movie = "" Then Msgbox(0,"Error","Please Fill in the movie title.") Else GUICtrlSetData($status,"Status: Searching") $IE = _IECreate("http://www.cdcovers.cc/dvd_" & StringLower(StringLeft($movie,1)) & ".php",0,0) _IELoadWait($IE) $Form = _IEFormGetObjByName($IE,"download") $list = _IEFormElementGetObjByName($Form,"titleList") _IEFormElementOptionselect($list,$movie,1,"byText") GUICtrlSetData($status,"Status: Found") _IELinkClickByText($IE,"Front") $submit = _IEFormElementGetObjByName($Form,"submit") GUICtrlSetData($status,"Status: Downloading") _IEAction($submit, "click") _IELoadWait($IE) $source = _IEDocReadHTML($IE) $split = StringSplit(StringTrimLeft(StringTrimLeft($source,StringInStr($source,"<script language=Javascript>window.onload=setTimeout('document.the_cover.src=")),StringLen("<script language=Javascript>window.onload=setTimeout('document.the_cover.src=")),'"') InetGet($split[1],@DesktopDir & "\" & $movie & ".jpeg") EndIf MsgBox(0,"Download Successful","The Download was a success") GUICtrlSetData($status,"Status: Waiting") GUICtrlSetData($title,"") Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd Edited September 5, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
lod3n Posted September 5, 2006 Share Posted September 5, 2006 I'm going to duck out of this one. [font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font] Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 now it probaly possible to compile a list so your not guessing ahahha ill work on that one later when im really bored Link to comment Share on other sites More sharing options...
jefhal Posted September 5, 2006 Share Posted September 5, 2006 thatsgreat2345- The whole idea of this script cracks me up! Add to that the fact that it works like a charm and I had a fine laugh over the whole thing. Not to mention your fine programming! MORE COFFEE FOR THE LAD!!! ...by the way, it's pronounced: "JIF"... Bob Berry --- inventor of the GIF format Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 (edited) thatsgreat2345- The whole idea of this script cracks me up! Add to that the fact that it works like a charm and I had a fine laugh over the whole thing. Not to mention your fine programming! MORE COFFEE FOR THE LAD!!!AHAHAHH thanks i guess, personally its a mess i had a sleep in it at first , and didnt like that and so smoke and i were just messing around and eh source sounded cool to grab but thanks , not the biggest fan of stringtrimming Edited September 5, 2006 by thatsgreat2345 Link to comment Share on other sites More sharing options...
Moderators big_daddy Posted September 5, 2006 Moderators Share Posted September 5, 2006 (edited) I'm also working on something, but I probably won't be able to finish it tonight. Here is a current screenshot.Edit: All I really have left to do is pull which type of covers are available and populate the last combo box with that info. Edited September 5, 2006 by big_daddy Link to comment Share on other sites More sharing options...
Thatsgreat2345 Posted September 5, 2006 Share Posted September 5, 2006 I'm also working on something, but I probably won't be able to finish it tonight. Here is a current screenshot.Edit: All I really have left to do is pull which type of covers are available and populate the last combo box with that info. you beat me to it i have to leave and cant finish my script Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now