Jump to content


Recommended Posts

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




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?

Link to post
Share on other sites
  • Developers

Have you checked what exactly is returned by the _NowDate() UDF?

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
Live for the present,
Dream of the future,
Learn from the past.

Link to post
Share on other sites


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")


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

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

    No registered users viewing this page.

  • Create New...