Sign in to follow this  
Richard

screen capturing with Time stamp

Recommended Posts

I have created a button with a quick sequence to save a screen shot. The only problem is that I dont know how to make it save as time stamped filename.

page.capture("Testing","C:\Users\richa\Desktop\DaqFac Testing\Screen Shots\Test(systime).jpg") This is what I tried and it only gives me one file with Test(systime) as the title of the pic file.

It will overwrite itself every time the button is pushed. Help on correcting this please or another way to do this.

Share this post


Link to post
Share on other sites

Use the formatDateTime() function:

page.capture("Testing","C:\Users\richa\Desktop\DaqFac Testing\Screen Shots\Test(" + formatDateTime("%c", systime()) + ").jpg") 

You'll probably want something besides %c as that likely has illegal characters.  See the user's guide on formatdatetime() for all the possible specifiers you can use to format the date / time output.

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