StAbb Posted July 3, 2008 Share Posted July 3, 2008 I apologize if this question has already been answered, I think I might have seen it before, but I cant find it now. But I was wondering if there was any way I could use an image from online in my GUI. I mean I know I could use the Temp Internet Files, but is there any other way that is simpler? I was also wondering the most efficient way of grabbing an image offline. I mean if there is a way to just use the URL of the image in the GUI then whats the best way to grab the URL of a sepcific image, should I use _IEImgGetCollection or _IEGetObjById or should I just parse the URL from the HTML of the page? And if I cant use the direct URL, and I go the Temp Internet file route, what is the best solution for getting the file name of the image when saved, I am assuming I should just parse that from the URL of the image? Sorry for all the questions, I'm just trying to grasp the full concept behind this specific action. Any help would be greatly appreciated. Thanks guys! -Steve Link to comment Share on other sites More sharing options...
rasim Posted July 4, 2008 Share Posted July 4, 2008 Mayb this? #include <IE.au3> $oIE = _IECreateEmbedded() $hGUI = GUICreate("Test", 300, 200) GUISetState() GUICtrlCreateObj($oIE, 10, 10, 280, 180) _IENavigate($oIE, "http://www.autoitscript.com/autoit3/files/graphics/autoit9_wall_thumb.jpg") Do Until GUIGetMsg() = -3 Link to comment Share on other sites More sharing options...
JustinMeyer Posted July 4, 2008 Share Posted July 4, 2008 Look to the help file for "InetGet" Link to comment Share on other sites More sharing options...
nobbe Posted July 4, 2008 Share Posted July 4, 2008 (edited) maybe like this? when using a picture control you will need to DL the file somehow.. expandcollapse popup#include <GUIConstants.au3> #include <IE.au3> $oIE = _IECreateEmbedded() $gui = GUICreate("GUI", 853, 725, 193, 115) $btn_Refresh_picture = GUICtrlCreateButton("refresh file", 576, 24, 75, 25, 0) $btn_Refresh_picture_IE = GUICtrlCreateButton("refresh ie", 576, 64, 75, 25, 0) ; as a picture control $image_pic = GUICtrlCreatePic("", 16, 424, 305, 265) ; as a IE "window" GUICtrlCreateObj($oIE, 10, 10, 280, 180) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $btn_Refresh_picture $url = "http://www.autoitscript.com/autoit3/files/graphics/autoit9_wall_thumb.jpg" InetGet($url, @ScriptDir & "\temp.jpg") GUICtrlSetImage($image_pic, @ScriptDir & "\temp.jpg") Case $btn_Refresh_picture_IE _IENavigate($oIE, "http://www.autoitscript.com/autoit3/files/graphics/autoit9_wall_thumb.jpg") Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited July 4, 2008 by nobbe Link to comment Share on other sites More sharing options...
StAbb Posted July 4, 2008 Author Share Posted July 4, 2008 Thanks for the reply guys, but yea I ended up realizing that I could just do the INetGet temporary file method. Thanks JMeyer and Nobbe. 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