Jump to content

Recommended Posts

Posted

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...
Posted (edited)

Modded for every connection no sleep now :P 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 by thatsgreat2345
Posted

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...
Posted

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
Posted

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...
Posted

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

I 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...
Posted

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]

Posted (edited)

here we go :P

#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 by thatsgreat2345
Posted

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
Posted (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 :P, not the biggest fan of stringtrimming :nuke:

Edited by thatsgreat2345
  • Moderators
Posted (edited)

I'm also working on something, but I probably won't be able to finish it tonight.

Here is a current screenshot.

Posted Image

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 by big_daddy
Posted

I'm also working on something, but I probably won't be able to finish it tonight.

Here is a current screenshot.

Posted Image

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.

:P you beat me to it i have to leave and cant finish my script

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
  • Recently Browsing   0 members

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