You're going to need to get into loops and variables within the script to do it. Assuming the files are named sequentially as most sane cameras would generate them, then it would look roughly like this at the 50,000' elevation:
//control variable, counts which photo you're on
var lcv = 0;
//how many photos are there?
var numPhotos = 1000;
//used to track the name of the file in the loop
var filename;
//used to track the shape to cut in the loop
var shapeRef;
//used to track the left and right edges of the slice
var leftEdge;
var rightEdge;
//main processing loop
for (lcv = 0; lcv < numPhotos; lcv++ ) {
// process one image.
filename = 'img_'+(lcv + 1234)+'.jpg';
//open the file here... get it ready to cut from
...
//create the selection box here, we'll use the LCV to control how far over we move
leftEdge = lcv * sliceWidth;
rightEdge = leftEdge + sliceWidth;
shapeRef = [ [leftEdge, 0], //upper left
[rightEdge, 0], //upper right
[rightEdge, 3400], //lower right
[leftEdge, 3400] ]; //lower left
// use the above shapeRef to first cut from the above opened file, then paste it into your master file.
// close the file you opened above so we can move on to the next file
}
I've made some assumptions above:
- you're coding in JS
- first image is number 1234, and they go in order, with names like "img_1234.jpg"
- the file is 3400 pixels tall.
- you already know how to open the image, cut the slice out and paste it into another image. :)
If the first couple aren't legit assumptions, adjust the code as needed. ;)
If you need more help with the syntax of using variables, two references come to mind:
- Adobe's Excellent intro scripting guides
- W3 school's JS resources or the Mozilla Developers Center's JS section