Sign in to follow this  
Followers 0
Gui

Getting an image of a webpage, and showing it in the GUI?

9 posts in this topic

Aye guys, I was wondering about getting an image of a webpage, and showing it into another embedded Obj in the GUI. Yes, the image is a captcha, and I want to show it inside another embedded obj, that is in the GUI. This is what I've tried so far, but it fails. It get's the source URL of the captcha and displays it, but it's a completed different captcha image. I want the current one on the webpage.

While 1
    $nMsg = GUIGetMsg()
        Switch $nMsg
            Case $GUI_EVENT_CLOSE
                Exit
            Case $nav ; that button navigates to the webpage.. which is right under this. This website is just an example.
                _IENavigate($oIE,'https://signup.live.com/signup.aspx?ru=http%3a%2f%2fmail.live.com%2f%3frru%3dinbox&wa=wsignin1.0&rpsnv=11&ct=1259338197&rver=6.0.5285.0&wp=MBI&wreply=http:%2F%2Fmail.live.com%2Fdefault.aspx&lc=1033&id=64855&mkt=en-us&bk=1259338201&rollrs=12&lic=1')
                $capt = _IEImgGetCollection($oIE,6) ; that's the captcha image.
                    _IENavigate($oIEE,$capt.src) ; The second Obj for the captcha navigates to the captcha's src, the source URL for it. But it always comes up as a different captcha, not the current one..
                    ; above, I want it to navigate to the current captcha being shown, not a captcha that's different..
                
        
        EndSwitch
WEnd

With regards,

GUI.

Share this post


Link to post
Share on other sites



You should be able to use InetGet (or InetRead for when the new release comes out) to save the picture to the temporary internet files folder. Then just make a control to display the image.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

What's the directory for the internet files folder? I thought of that, but for doing it multiple times, it would take up memory, unless you just over righted that last picture saved. Anyway thanks alot for the reply! Also what control, an obj, or what?

Edited by Gui

Share this post


Link to post
Share on other sites

It doesn't really matter what folder you use, but most people delete their temporary internet files periodically so the file would be deleted as well. Use the @Temp macro in place of the folder name to get the folder directory.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

It doesn't really matter what folder you use, but most people delete their temporary internet files periodically so the file would be deleted as well. Use the @Temp macro in place of the folder name to get the folder directory.

Ok, and what do I use in the GUI to show the image? Or how do I after the image has been saved?

Share this post


Link to post
Share on other sites

Ok, and what do I use in the GUI to show the image? Or how do I after the image has been saved?

Try:

$sImage = @TempDir & "\MyDownloadedImage.ext"
GuiCtrlUseAutoItHelpFileToShowImage($sImage)

♡♡♡

.

eMyvnE

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

Post removed.

I like Trancexx's approach more.

Edited by dantay9

[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

Share this post


Link to post
Share on other sites

$oImg.src must not be correct. Make sure you have a fully qualified url. Also, try DebugBar for IE. That is how I deal with most IE objects.


[font="Verdana"] [size="2"]"[/size][/font]Failure is not an option -- it comes packaged with Windows"[font="Verdana"][size="2"] Gecko Web Browser[/size][/font][font="Verdana"][size="2"], [/size][/font][font="Verdana"][size="2"]Yahtzee![/size][/font][font="Verdana"][size="2"], Toolbar Launcher (like RocketDock)[/size][/font][font="Verdana"][size="2"]Internet Blocker, Simple Calculator, Local Weather, Easy GDI+ GUI [/size][/font][font="Verdana"][size="2"]Triangle Solver, TCP File Transfer, [/size][/font][font="Verdana"][size="2"]Valuater's Autoit Wrappers[/size][/font][font="Verdana"][size="3"][size="2"][size="2"]OOP In AutoIt[/size][/size][/size][/font][font="Verdana"][size="2"][size="1"]Using Windows XP SP3, 1GB RAM, AMD Athlon Processor @ 2.1 GHzCheck me out at gadgets.freehostrocket.com[/size][/size][/font]

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