Jump to content

Get Image


Recommended Posts

Ahh go and read the help a bit you could try with InetGet() that function is made for the purposes you have just read the help file all you need to know is that image's address call is very simple and I'm sure you will have no problem with getting it to work and likely less than people reading your post.

Hope that helps

Edited by trancexx

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

Its under a work webpage that I cant give you......

I might be able to find you a example if you would like

an example of a picture on a random web page? that may not be as helpful as you'd think... if the image has a different url each time then you have to figure a way to identify it in the HTML code of the page. maybe it's got the same tag or alt info every time, that you could use to find it in the code and grab the source... check out StringRegExp, _IEDocReadHTML, and perhaps htmlgoodies.com if you need help with understanding the html tags
Link to comment
Share on other sites

HotKeySet("{ESC}", "_Exit")

Global $handle

_Download()
AdlibRegister("_Download", 5 * 60 * 1000)

While 1
    Sleep(100)
WEnd

Func _Download()
    AdlibUnRegister("_Idle")
    $sSourceUrl = "http://www.autoitscript.com/forum/public/style_images/autoit/logo.png"
    $sTargetFilename = @DesktopDir & "\Picture_" & @YEAR & @MDAY & @HOUR & @MIN & @SEC & ".png"
    ConsoleWrite("-" & TimerInit() & ", Download to " & $sTargetFilename & " started" & @CRLF)
    $handle = InetGet($sSourceUrl, $sTargetFilename, 1, 1)
    $timer = TimerInit()
    While 1
        Sleep(250)
        ConsoleWrite(" " & TimerInit() & ", "& InetGetInfo($handle, 1) & " bytes download" & @CRLF)
        If InetGetInfo($handle, 2) Then
            Switch InetGetInfo($handle, 4)
                Case 0
                ConsoleWrite("+" & TimerInit() & ", Download to " & $sTargetFilename & " finished successfully"& @CRLF)
            case Else
                ConsoleWrite("!" & TimerInit() & ", Download to " & $sTargetFilename & " finished with Error-Code " & InetGetInfo($handle, 4) & @CRLF)
            EndSwitch
            InetClose($handle)
            ExitLoop
        EndIf
        If TimerDiff($timer) > 60 * 1000 Then
            ConsoleWrite("-" & TimerInit() & ", Download to " & $sTargetFilename & " timed out..." & @CRLF)
            InetClose($handle)
            ExitLoop
        EndIf
    WEnd
    ConsoleWrite("+" & TimerInit() & ", waiting for 5 minutes before restart..." & @CRLF)
    AdlibRegister("_Idle",10*1000)
EndFunc   ;==>_Download

Func _Idle()
    ConsoleWrite(" " & TimerInit() & ", Idle..." & @CRLF)
EndFunc

Func _Exit()
    InetClose($handle)
    Exit
EndFunc   ;==>_Exit

Link to comment
Share on other sites

Okay that code helped quite a bit but I still need a little guidance.

I found the perfect example just by absolute luck. here Ill give you the url

https://signup.live.com/signup.aspx?ru=http://mail.live.com/%3frru%3dinbox&wa=wsignin1.0&rpsnv=11&ct=1281120742&rver=6.0.5285.0&wp=MBI&wreply=http://mail.live.com/default.aspx&lc=1033&id=64855&mkt=en-us&bk=1281120742&rollrs=12&lic=1

now this is strictly a example but the captcha on there pages do what our work website dose every time you load the image url its a diffrent image but same url.

Please help me

***ONCE AGIAN This is not the website i am coding

Link to comment
Share on other sites

okay obviously I really have to find a issue to fix this lol

Can this possible work for me

_ScreenCapture_CaptureWnd (@DesktopDir & "\Captcha.jpg", $oIE, [,1 [,1 [,500 [,500]]]])

but also will this work and will it work if the $oIE window is in the background.

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