We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello! I use node to tweet png files from Processing. All is well but I'd like to develop this idea with your help please. Within my Processing sketches, get Processing to output my png file at any random frame count between, for example 100 and 200 frames. Not sure if there is another way to do this using a random timer?. I have an sample below that outputs a png at frame 100 only. Which is a bit static after a few iterations. Any help would be really great guys!
if (frameCount == 110) { save("output.png"); exit(); }
Answers
An example with millis(), but could be easy used with framecount instead.
But you do not really want to post images on twitter every few seconds, right?
Thanks for the reply. I just want to export the png after a random amount of time passed on the animation. Posting on twitter is not in scope as this is done using node.
Here's an example using frameCount:
`
`
Well instead of your current version with a fixed value of 100 frames, you could use a variable for that. Ans in setup() you can assign a random value to it.
And assign a new random value every time the condition is met
That's just perfect guys, thank you so much for taking time out over the weekend to help me. Cheers!