script to load 2 files - apply an action - and load the next

Anyone, especially newbies, asking for help with Photoshop Scripting and Photoshop Automation - as opposed to those contributing to discussion about an aspect of Photoshop Scripting

Moderators: Tom, Kukurykus

ghiii

script to load 2 files - apply an action - and load the next

Post by ghiii »

Hi there and thanks in advance for your efforts ))
I am working with photoshop CS3.
I recorded an action which helps me to work on 2 (currently loaded) images in combination. So far I am manually loading 2 images, applying the action (which ends with saving the both manipulated files again) - and then repeating the same for the next 2 jpg-files etc...
Now I would need a script to automate also this loading step via a script- as with normal batching I think I can only work on file by file individually.
The source jpg-picture files can be put all in one folder together (let's assume e.g. c:\start) - e.g. naming as 001a.jpg and 001b.jpg - followed by 002a.jpg and 002b.jpg etc - but if it would be easier to handle I could also split and put all "a"-files in one folder and all "b"-files in another folder - or do any logical naming which helps. If it's necessary I can arrange a full logical sequence 001,002,003,etc or else it should just be always the next 2 files even if it's 001,003,008,010,...).
The script should load e.g. 001a.jpg and 001b.jpg together - and then apply the action on these both pictures (lets say the action name is "combine" and let's assume my personal action set is called "gerald").
Then it should continue with the next 2 files in combination - until all pictures are processed.
Honestly I have to admit that I have no clue yet on how then to implement a script into photoshop. What kind of file type is it? Do I have to place it in a specially designated photoshop program folder or just load/activate from anywhere on my computer via any script-load-menu in photoshop?
-------------------
As the action itself works well in general there is no real need to work or change on this - but just to help you understand what's going on or in case it would even be easier to process the below action already straight within the script directly - here is what I then do with the 2 files via my action:
it's shrinking the pics horizontally to 50% width (height stays same/100%)
then placing pic "a" left and pic "b" right and save into the target folder (e.g. desktop/ZIEL)
and also to place pic "b" left and pic a" right and save also into the same target folder
so the result is a half left/right-combination of both pictures - one file with left+right and the other with right+left.
--------------------
But again - the action itself would work - it's just to put all the 2-file-loading and then the kick-off for the action into an automised loop and not to have to do that manually.
Maaaany thanks - and if there should be some bonus I can support you with - please let me know.