Jump to content
Sign in to follow this  
Medic873

Save Image

Recommended Posts

Medic873

Okay im trying to make it save a image that is displayed in Internet explorer.

I know the image name But would like to save it to the desktop as c.jpg how can i do this.

I would like to handle this without anything like mouse clicks because I want this to work on more then just my computer.

Thank you

Share this post


Link to post
Share on other sites
somdcomputerguy

Will this do it for you? Function InetGet


- Bruce /*somdcomputerguy */  If you change the way you look at things, the things you look at change.

Share this post


Link to post
Share on other sites
Medic873

O that is cool but not quite what im looking for because you must do things that my script already handles to get to the image. but I found take a screen shot and if I can just have it take a screen shot of the window that would be great witch it looks like it dose.

#Include <ScreenCapture.au3>

_ScreenCapture_CaptureWnd($sFileName, $hWnd [, $iLeft = 0 [, $iTop = 0 [, $iRight = -1 [, $iBottom = -1 [, $fCursor = True]]]]])

I belive $hWnd is for a window

But what do I put there the window title.

Also if the window is 100 pixels by 100 pixels will it get what is at 200 by 100 pixels becuase it is taking a window screen shot I assume it will just get the whole window. But I may be wrong.

Share this post


Link to post
Share on other sites
Medic873

What am I doing wrong here

_ScreenCapture_CaptureWnd(@MyDocumentsDir & "\GDIPlus_Image2.jpg", "[CLASS: Internet Explorer_Server]"

Share this post


Link to post
Share on other sites
Malkey

Try experimenting with this script. Like, removing the last five optional parameters of the _ScreenCapture_CaptureWnd() function.

#include <ScreenCapture.au3>

If WinExists("[Class:IEFrame]") Then
    WinActivate("[Class:IEFrame]")
    WinWaitActive("[Class:IEFrame]") ; guarantees IE window is top most.

    ; Capture 100x100 of control window within IE window starting at point 0,10 - x, y control window coordinates.
    _ScreenCapture_CaptureWnd(@DesktopCommonDir & "\c.jpg", _
            ControlGetHandle("[Class:IEFrame]", "", "Internet Explorer_Server1"), 0, 10, 100, 110, False)

    ; Capture 100x100 of IE window starting at point 0,10 - x, y IE window coordinates.
    ;_ScreenCapture_CaptureWnd(@DesktopCommonDir & "\c.jpg", WinGetHandle("[Class:IEFrame]", "" ), 0,10,100,110)

    ShellExecute(@DesktopCommonDir & "\c.jpg")
    Sleep(1000)
    Local $ret = MsgBox(33, "Decision required", "Press OK to delete image file.", WinGetHandle(""))
    If $ret = 1 Then FileDelete(@DesktopCommonDir & "\c.jpg")
EndIf

Share this post


Link to post
Share on other sites
Medic873

Omg looks like this is working great. Let me work with it a bit more and see how far I can take this thank you.

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  

×