Jump to content

Recommended Posts

Posted

I'm not sure what the deal is, but all I want to do is take a screen capture from a Webpage and Save it as jpg:

#include <ScreenCapture.au3>


Example()


Func Example()
    ; Capture full screen
    _ScreenCapture_Capture("C:\blap\GDIPlus_Image1.jpg")


    ShellExecute("C:\blap\GDIPlus_Image1.jpg")


    ; Capture region
    _ScreenCapture_Capture("c:\blap\GDIPlus_Image2.jpg", 0, 0, 796, 596)


    ShellExecute("c:\blap\GDIPlus_Image2.jpg")
EndFunc   ;==>Example

But I always get a error pop-up that says:

Windows cannot find 'C:blapGDIPlus_Image1.jpg'.  Make sure you typed the name correctly, and then try again.

I am using Windows Server 2008.  Maybe it is a permissions thing?  

Thanks!

 

Posted

The folder has to exist. Use l3ill's example.

UDF List:

  Reveal hidden contents

Updated: 22/04/2018

  • Solution
Posted (edited)

There is a bug in >_GDIPlus_Startup() for Vista and Server 2008. Use _GDIPlus_Startup("gdiplus.dll") and it should work.

#include <ScreenCapture.au3>


Example()


Func Example()
    ; Capture full screen
    _GDIPlus_Startup("gdiplus.dll")
    _ScreenCapture_Capture("C:\blap\GDIPlus_Image1.jpg")


    ShellExecute("C:\blap\GDIPlus_Image1.jpg")


    ; Capture region
    _ScreenCapture_Capture("c:\blap\GDIPlus_Image2.jpg", 0, 0, 796, 596)


    ShellExecute("c:\blap\GDIPlus_Image2.jpg")
    _GDIPlus_Shutdown()
EndFunc   ;==>Example

Br,
UEZ

Edited by UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

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
  • Recently Browsing   0 members

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