screen capturing with Time stamp


Richard

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.

Link to comment
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.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.