Jump to content

Recommended Posts

Posted

MsgBox (0, "TEST", "TEST")

$Date=_NowDate()

$Time=_NowTime()

_ScreenCapture_Capture($Date&$Time&".jpg")

I'm trying to save a screenshot in the scripts directory with the name of the script being the date and the time but it doesn't work. But it works fine if I set the name manually for image (like _ScreenCapture_Capture("test.jpg")

any ideas please?

Posted

tsolrm,

The code you posted will not run without adding a couple of #include stmts. Once you get it to run, and, follow Jos's advice you will see that the file name will contain "/" chars. These are invalid for a file name. Perhaps you want to do something like

#include <ScreenCapture.au3>
_ScreenCapture_Capture("c:tmp" & @YEAR & '-' & @MON & '-' & @MDAY & ' ' & @HOUR & @MIN & ".jpg")

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

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...