We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpSyntax Questions › generic load list of strings/images from file &nbs
Page Index Toggle Pages: 1
generic load list of strings/images from file &nbs (Read 280 times)
generic load list of strings/images from file &nbs
Jul 17th, 2008, 3:57pm
 
Hi, I was wondering, if anyone knows how to load strings without always specifying their name by typing it in.
The normal way would be :

String InputFile = "W_09_1600.jpg";

However, the image gets renamed and I cannot retype the name in processing every time as there will be many images.
One way I thought of was to create a text file with all the names of the images, read the text file and get the names. the images are done in another software, so it could also automatically generate the list, but.... Is there a better (more clever) way to do this?
PS: the length of the string does not change
Thanks, martin
Re: generic load list of strings/images from file
Reply #1 - Jul 17th, 2008, 5:08pm
 
You could load all files in a specific folder.

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1200614766;start=2#2
Page Index Toggle Pages: 1