Gui Posted November 28, 2009 Share Posted November 28, 2009 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. Link to comment Share on other sites More sharing options...
dantay9 Posted November 28, 2009 Share Posted November 28, 2009 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. Link to comment Share on other sites More sharing options...
Gui Posted November 28, 2009 Author Share Posted November 28, 2009 (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 November 28, 2009 by Gui Link to comment Share on other sites More sharing options...
dantay9 Posted November 28, 2009 Share Posted November 28, 2009 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. Link to comment Share on other sites More sharing options...
Gui Posted November 28, 2009 Author Share Posted November 28, 2009 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? Link to comment Share on other sites More sharing options...
trancexx Posted November 28, 2009 Share Posted November 28, 2009 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 Link to comment Share on other sites More sharing options...
dantay9 Posted November 28, 2009 Share Posted November 28, 2009 (edited) Post removed. I like Trancexx's approach more. Edited November 28, 2009 by dantay9 Link to comment Share on other sites More sharing options...
Gui Posted November 28, 2009 Author Share Posted November 28, 2009 The inetget didn't work.. It was like this.. Inetget($oImg.src, @DesktopDir & '\captcha.jpg') Link to comment Share on other sites More sharing options...
dantay9 Posted November 28, 2009 Share Posted November 28, 2009 $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. 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