- Home /
JS-Complicated Directory Array Texture Method
Ok so this question is divided into parts. Please answer all of this in javascript (Windows). I have a System.IO.Directory called Screenshots of where I take a picture using the Application.Capture command and save it to the folder each as a png named #record e.g. 5record, 549record, 1045record.
The png files are all setup in ascending order. (1record,2record,3record etc..) So each time I take a screenshot, it adds it as the next 'record.png' file.
How do I code something so it looks into the Screenshot folder, sees how many pictures there are, that sets the array length, it orders the array ascendingly via the picture e.g. pic[1] = 1record , pic[2] = 2record, pic[25] = 25record. It sorts it from the lowest range so if there is only a 30record, 31record and 32record, it sets pic[1] = 30record, pic[2] = 31record and pic[3] = 32record
This code sets each record.png file as a texture. I need the length of the array (how many pics in the Screenshot folder) to be a variable of which I can use in some other cases.
Well I summed that up in four paragraphs so hopefully you, the 'elders' of the coding world can help me with this slightly complex question. Thanks.