How to promote a certain image to the top of a stack?
Hi,
I'm new at this so bear with me.
I have the following code:
| #target bridge |
| function StackIt() { | |
| var fileList = Folder(app.document.presentationPath).getFiles("*DIFFUSE*"); | |
| for(var a in fileList){ | |
| var firstFile = decodeURI(fileList.name.match(/[^_]*/)); | |
| var filesToStack = Folder(app.document.presentationPath).getFiles("*"+firstFile+"*"); | |
| app.document.deselectAll(); | |
| for(var s in filesToStack){ | |
| app.document.select(new Thumbnail(filesToStack | |
| }; | |
| app.document.chooseMenuItem("StackGroup"); | |
| }; | |
| }; |
StackIt();
which works liek a charm.
Now I want to make sure that in all the stacks, the image with the *DIFFUSE* name component is always shown at the top of the stack.
How would I go about that?
