Posted By

dx0ne on 02/22/09


Tagged


Versions (?)

Processing: onClick screenshot


 / Published in: Processing
 

  1. void mouseReleased() {
  2. saveFrame(gimme_name("myProject_"));
  3. };
  4.  
  5. String gimme_name(String begin)
  6. {
  7. String name = begin;
  8. name+=String.valueOf(year());
  9. name+=".";
  10. if(month()<10) name+="0";
  11. name+=String.valueOf(month());
  12. name+=".";
  13. if(day()<10) name+="0";
  14. name+=String.valueOf(day());
  15. name+="_";
  16. if(hour()<10) name+="0";
  17. name+=String.valueOf(hour());
  18. name+=".";
  19. if(minute()<10) name+="0";
  20. name+=String.valueOf(minute());
  21. name+=".";
  22. if(second()<10) name+="0";
  23. name+=String.valueOf(second());
  24. name+=".png";
  25. return name;
  26. }

Report this snippet  

You need to login to post a comment.