Jump to content

Show PNG...


Recommended Posts

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

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 connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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
He said without download.

Obviously that is impossible.

♡♡♡

.

eMyvnE

Link to comment
Share on other sites

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

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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 by Yashied
Link to comment
Share on other sites

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 by bogQ

TCP server and client - Learning about TCP servers and clients connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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

...

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

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.
Link to comment
Share on other sites

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 connection
Au3 oIrrlicht - Irrlicht project
Au3impact - Another 3D DLL game engine for autoit. (3impact 3Drad related)



460px-Thief-4-temp-banner.jpg
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

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

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

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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...