Sign in to follow this  
Followers 0
Medic873

Get Image

19 posts in this topic

Okay

I have a simple issue I am running a webbrowser in the background but I cant find a way to pull a image it needs to pull a image every 5 minutes but how can I have it copy or save the image on my desktop..

Thank You

Share this post


Link to post
Share on other sites



I dont understand what you mean please ala berate

Share this post


Link to post
Share on other sites

#4 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites

One little problem with the inetget function. The url it will pull loads a diffrent image everytime I load the page. So... dosnt work needs to be the same image I would see if I was looking at the browser window

Share this post


Link to post
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

Share this post


Link to post
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

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

I already have a way of identifiing it.

It always has the same Id and same url but every time you load the page it will display a diffrent image.

Share this post


Link to post
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

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

I still haven't been able to accomplish this please help thank you

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Well it surely won't work with those square brackets in there.. but I don't know for sure if the screen cap function will work out for you or not, sorry..


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites

Well thank you for the tip I almost got it to work by fixing the brackets but now it returns a image with nothing in it...

Thank You

if anyone can help please do thank you

Share this post


Link to post
Share on other sites

new try im going use the _IEAction step with copy

then try to save it as a screenshot

Share this post


Link to post
Share on other sites

Dosnt look like will work either anyone else have any idea's

Share this post


Link to post
Share on other sites

okay I found another post on this fourm that claims the Ie Focus action might be able to do exacly what I want.

Please help me could this possible take a screen shot for me

Share this post


Link to post
Share on other sites

Well im officially out of idea's if anyone has a suggestion please just throwing anything out there.

thank you

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