I have uploaded a .zip archive: https://www.dropbox.com/s/bejqr2p2g3rdrk2/ps-variable-demo.zip Contents: * dataset.csv = simple test data source file * demo-test.psd = Photoshop file for test export * Resize layer to 2277px.jsx = Script to resize targeted layer content to 2277px wide * Variable-Resize-Demo.atn = Action file that references the script with other steps There are also two folders: * Export to Datasets = Original export of data sets x2 .psd files * Action Output = Batch action output resize results x2 .psd files STEP 1 - INSTALLATION: 1) Install the script in the Photoshop scripts folder (CS6 used as example): Mac - /Applications/Adobe Photoshop CS6/Presets/Scripts Win - C:\Program Files\Adobe\Adobe Photoshop CS6\Presets\Scripts (Exit and restart Photoshop) Double check that you can see the “Resize layer to 2277px.jsx” script when you go to File/Scripts/ 2) Install the action in Photoshop: Window/Actions/Load Actions… (from the upper right options menu in the action window) The “Variable-Resize-Demo.atn” file can be loaded from any location, unlike scripts they do not need to be in a specific folder STEP 2 - EDIT THE ACTION: 1) As the action has the install location of the script on my system, you will need to delete the action step “Scripts” and insert the action into the script using your scripts installed location. After dragging the ”scripts” action step to the trash icon in the actions window, use the actions window’s options menu to “insert menu item”, then select the file menu/scripts/Resize layer to 2277px Ensure that the script steps appear in the same order as the image in my previous post. STEP 3 - TEST THE VARIABLES: Open the file “demo-test.psd” and go to image/variables/data sets and make sure that it is still linked to the demo “dataset.csv” file and that you can cycle through the two data sets using the data set navigation arrows. IMPORTANT: Note that I made the text font size smaller in the “Line1” layer, this is critical as the longest variable character line should be smaller in width than the yellow bar “Shape 1”, so that the action can resize the text to the correct width. Also note that the variable text layer is set using “centre” alignment and is centred on the canvas. STEP 4 - EXPORT DATA SETS: 1) Use File/Export/Data Sets as Files… to export out the data sets to PSD files. STEP 5 - BATCH ACTION TEST ON THE EXPORTED DATA SET FILES: 1) Setup a File/Automate/Batch similar to the image in my previous post. If everything is setup correctly, then you should find that the results of the data set export have been resized to match the width of the yellow graphic. You will need to edit or create separate actions to handle different variable text layers, this sample only targets the specific text layer “Line1”. Good luck and please post back for advice if you get stuck, you have a lot to learn for a new user of Photoshop, variables and automation via actions/scripts is a bit more advanced than many would first attempt!
... View more