Floppy Posted May 22, 2009 Share Posted May 22, 2009 I want to show a PNG image from a web site in my GUI, without download it. How can I do this? Link to comment Share on other sites More sharing options...
muncherw Posted May 22, 2009 Share Posted May 22, 2009 I want to show a PNG image from a web site in my GUI, without download it.How can I do this?When you see anything from a website it's downloaded the file even if it's to a temp folder that you aren't aware of. Other People's Stuff:Andy Flesner's AutoIt v3: Your Quick Guide[topic="34302"]Locodarwin's ExcelCom_UDF[/topic][topic="61090"]MrCreatorR's Opera Library[/topic] Link to comment Share on other sites More sharing options...
bogQ Posted May 22, 2009 Share Posted May 22, 2009 this can help #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = _IECreateEmbedded() GUICreate("My GUI"); will create a dialog box that when displayed is centered GUISetState(@SW_SHOW); will display an empty dialog box $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) _IENavigate($oIE,'about:blank') _IEBodyWriteHTML ($oIE, '<img src=http://www.google.com/logos/marycassatt09.gif>') While 1 WEnd TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
trancexx Posted May 22, 2009 Share Posted May 22, 2009 this can help #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = _IECreateEmbedded() GUICreate("My GUI"); will create a dialog box that when displayed is centered GUISetState(@SW_SHOW); will display an empty dialog box $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) _IENavigate($oIE,'about:blank') _IEBodyWriteHTML ($oIE, '<img src=http://www.google.com/logos/marycassatt09.gif>') While 1 WEndHe said without download. Obviously that is impossible. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Floppy Posted May 22, 2009 Author Share Posted May 22, 2009 When you see anything from a website it's downloaded the file even if it's to a temp folder that you aren't aware of. Yes! But where's taht temp folder? I want to do this exactly to take advantage of the image already downloaded. Why I should download the image twice? this can help #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = _IECreateEmbedded() GUICreate("My GUI"); will create a dialog box that when displayed is centered GUISetState(@SW_SHOW); will display an empty dialog box $GUIActiveX = GUICtrlCreateObj($oIE, 10, 40, 600, 360) _IENavigate($oIE,'about:blank') _IEBodyWriteHTML ($oIE, '<img src=http://www.google.com/logos/marycassatt09.gif>') While 1 WEnd Thanks! But this is not helpful because you simply view a single image in an imbedded browser. The problem is if you have a page with hundreds of images and texts!!! Link to comment Share on other sites More sharing options...
bogQ Posted May 22, 2009 Share Posted May 22, 2009 (edited) He said without download.Obviously that is impossible.he must download it first time. After that IE is dooing all other work for him.He isth downloading that picture second time becose its already stored on his comp, he only must call the correct picture address second time and itl load from comp.The only way that his comp is downloading the one picture more then one time is that he mesed up his IE options. Noone can goto temp internet folder locate picture and put it directly in gui (if he doesnt copy it maualy) besoce "as i think" windows protect that files and y cant see them as regular files with regular addresses, you can activate them (that temp picture) when calling second time identical address from IE and IE will do all other work 4 y. Edited May 22, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Authenticity Posted May 22, 2009 Share Posted May 22, 2009 You can compile the resource with AutoIt and refer to is as GUICtrlSetImage($Button, @ScriptFullPath, -5) or -3, don't remember which is the first. Link to comment Share on other sites More sharing options...
Yashied Posted May 22, 2009 Share Posted May 22, 2009 (edited) You can compile the resource with AutoIt and refer to is as GUICtrlSetImage($Button, @ScriptFullPath, -5) or -3, don't remember which is the first.GUICtrlSetImage() does not work with PNG image. EDIT: #Include <File.au3> #Include <Icons.au3> GUICreate('MyGUI', 249, 240) GUISetState() $Png = _TempFile(@TempDir, "~", ".png") $Pic = GUICtrlCreatePic('', 10, 10, 229, 220) $Label = GUICtrlCreateLabel('Loading...', 10, 105, 229, 16, 0x01) InetGet('http://www.dailycupoftech.com/wp-content/uploads/2007/05/autoit.png', $Png) GUICtrlDelete($Label) _SetImage($Pic, $Png) Do Until GUIGetMsg() = -3 FileDelete($Png) Icons.au3 Edited May 22, 2009 by Yashied My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
bogQ Posted May 22, 2009 Share Posted May 22, 2009 (edited) If i understand correctly InetGet ( "URL" [,"filename" [, reload [, background]]] ) reload [optional] 0 = (default) Get the file from local cache if available (i hope that thisone is to see if img is already downloaded to your comp) 1 = Forces a reload from the remote site if file not #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = _IECreateEmbedded() GUICreate("My GUI",@DesktopWidth-40,@DesktopHeight-150) GUISetState(@SW_SHOW) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 10, @DesktopWidth-60,@DesktopHeight-170) _IENavigate($oIE,'about:blank') $opt1 = 1 $data3 = InetGetSize("http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png") If FileExists("__Thx_10000___Shadowna_Hedgi___by_Shadowna.png") Then If $data3 = FileGetSize("__Thx_10000___Shadowna_Hedgi___by_Shadowna.png") Then _IEBodyWriteHTML ($oIE, '<img src="file:///'&StringReplace(StringReplace(@ScriptDir," ","%20"),"\","/")&'/'&'/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png">') Else InetGet ( "http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" ,"__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" , 1,1) $opt = 1 _IEBodyWriteHTML ($oIE, '<img src=http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png>') EndIf Else $opt = 1 InetGet ( "http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" ,"__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" , 0,1) _IEBodyWriteHTML ($oIE, '<img src=http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png>') EndIf While 1 While @InetGetActive = 1 ToolTip("DOWNLOADING FROM "&@InetGetBytesRead&" TO "&$data3) WEnd If $opt1 = 1 Then ToolTip("") Else $opt1 = 0 EndIf Sleep(100) WEnd edited Edited May 22, 2009 by bogQ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Floppy Posted May 23, 2009 Author Share Posted May 23, 2009 If i understand correctly InetGet ( "URL" [,"filename" [, reload [, background]]] ) reload [optional] 0 = (default) Get the file from local cache if available (i hope that thisone is to see if img is already downloaded to your comp) 1 = Forces a reload from the remote site if file not #include <IE.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> $oIE = _IECreateEmbedded() GUICreate("My GUI",@DesktopWidth-40,@DesktopHeight-150) GUISetState(@SW_SHOW) $GUIActiveX = GUICtrlCreateObj($oIE, 10, 10, @DesktopWidth-60,@DesktopHeight-170) _IENavigate($oIE,'about:blank') $opt1 = 1 $data3 = InetGetSize("http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png") If FileExists("__Thx_10000___Shadowna_Hedgi___by_Shadowna.png") Then If $data3 = FileGetSize("__Thx_10000___Shadowna_Hedgi___by_Shadowna.png") Then _IEBodyWriteHTML ($oIE, '<img src="file:///'&StringReplace(StringReplace(@ScriptDir," ","%20"),"\","/")&'/'&'/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png">') Else InetGet ( "http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" ,"__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" , 1,1) $opt = 1 _IEBodyWriteHTML ($oIE, '<img src=http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png>') EndIf Else $opt = 1 InetGet ( "http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" ,"__Thx_10000___Shadowna_Hedgi___by_Shadowna.png" , 0,1) _IEBodyWriteHTML ($oIE, '<img src=http://www.deviantart.com/download/62927738/__Thx_10000___Shadowna_Hedgi___by_Shadowna.png>') EndIf While 1 While @InetGetActive = 1 ToolTip("DOWNLOADING FROM "&@InetGetBytesRead&" TO "&$data3) WEnd If $opt1 = 1 Then ToolTip("") Else $opt1 = 0 EndIf Sleep(100) WEnd edited Thanks! But I said 'without download it'. I want to get the image directly from the web site. Have you ever seen a video in streaming? I believe yes! You can see the video, without download it; or in some cases downloading it only once in the temp dir. I want to the same...but with images! My question is: Is this possible with AutoIt? Link to comment Share on other sites More sharing options...
trancexx Posted May 23, 2009 Share Posted May 23, 2009 ...Have you ever seen a video in streaming? I believe yes!You can see the video, without download it; or in some cases downloading it only once in the temp dir.I want to the same...but with images!My question is: Is this possible with AutoIt?I wonder what is your definition of "download"? ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Yashied Posted May 23, 2009 Share Posted May 23, 2009 I want to show a PNG image from a web site in my GUI, without download it.How can I do this?Thanks! But I said 'without download it'. I want to get the image directly from the web site.Have you ever seen a video in streaming? I believe yes!You can see the video, without download it; or in some cases downloading it only once in the temp dir.I want to the same...but with images!My question is: Is this possible with AutoIt?You are master of mislead. You are your own contradiction. If you want to get the file from the Internet without writing to disk, then study it. If you do not want to download the file every time you approach him, use InetGet(), I gave you an example for this. My UDFs: iKey | FTP Uploader | Battery Checker | Boot Manager | Font Viewer | UDF Keyword Manager | Run Dialog Replacement | USBProtect | 3D Axis | Calculator | Sleep | iSwitcher | TM | NetHelper | File Types Manager | Control Viewer | SynFolders | DLL Helper Animated Tray Icons UDF Library | Hotkeys UDF Library | Hotkeys Input Control UDF Library | Caret Shape UDF Library | Context Help UDF Library | Most Recently Used List UDF Library | Icons UDF Library | FTP UDF Library | Script Communications UDF Library | Color Chooser UDF Library | Color Picker Control UDF Library | IPHelper (Vista/7) UDF Library | WinAPI Extended UDF Library | WinAPIVhd UDF Library | Icon Chooser UDF Library | Copy UDF Library | Restart UDF Library | Event Log UDF Library | NotifyBox UDF Library | Pop-up Windows UDF Library | TVExplorer UDF Library | GuiHotKey UDF Library | GuiSysLink UDF Library | Package UDF Library | Skin UDF Library | AITray UDF Library | RDC UDF Library Appropriate path | Button text color | Gaussian random numbers | Header's styles (Vista/7) | ICON resource enumeration | Menu & INI | Tabbed string size | Tab's skin | Pop-up circular menu | Progress Bar without animation (Vista/7) | Registry export | Registry path jumping | Unique hardware ID | Windows alignment More... Link to comment Share on other sites More sharing options...
bogQ Posted May 23, 2009 Share Posted May 23, 2009 Thanks! But I said 'without download it'. I want to get the image directly from the web site. O_o Have you ever seen a video in streaming? I believe yes! bluntness then start remote desktop connection (set your comp on network connection with no internet on it) put your script on remote computer (put on your other comp IE conection) and quala your not going to download anything, other comp will, and your gona stream everything you see on that comp then embed your RDC in Gui You can see the video, without download it; everything y see is downloaded in one way or another only diffrence is that when you dcc that file cache is delited, start youtube clip and then dcc from internet and youl see that with no IE connection y cant see anything on yourtube. wona know why? becose you cant recive data (download data)(stream data or what y call it) with no IE connection O_o im off from this topic :/ TCP server and client - Learning about TCP servers and clients connectionAu3 oIrrlicht - Irrlicht projectAu3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related) There are those that believe that the perfect heist lies in the preparation.Some say that it’s all in the timing, seizing the right opportunity. Others even say it’s the ability to leave no trace behind, be a ghost. Link to comment Share on other sites More sharing options...
Floppy Posted May 23, 2009 Author Share Posted May 23, 2009 You are master of mislead. You are your own contradiction. If you want to get the file from the Internet without writing to disk, then study it. If you do not want to download the file every time you approach him, use InetGet(), I gave you an example for this.Yes, but with InetGet the file is downloaded.NOTE: The example of streaming was only an example to say that I don't want to download nothing. Link to comment Share on other sites More sharing options...
oMBRa Posted May 23, 2009 Share Posted May 23, 2009 Yes, but with InetGet the file is downloaded.NOTE: The example of streaming was only an example to say that I don't want to download nothing.Draw your png on a sheet of paper with a pen Link to comment Share on other sites More sharing options...
Richard Robertson Posted May 24, 2009 Share Posted May 24, 2009 You aren't listening. Everything you view on the internet is downloaded. End of story. There is no getting around that. Stop asking. 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