Copy link to clipboard
Copied
I have a folder on the C drive called "Container". Since I often have to open pictures from a camera and Windows always remembers the last task I can not write an action which always opens this particular folder.
Can a Script be written that always will open this folder regardless what was opened before?
Try this
var dir = Folder('C:/Container');
var files = dir.openDlg('This is always the same folder?','',true);
open(File(files));
I still think your description reads like your trying to create some sort of a collage. What you call a Background sounds like some sort of Template files with image placement selections. If this is so I still think you should look at my collage toolkit. The collages it creates are layered PSD documents that you can tweak and move the image about. Your Images are plac
...Copy link to clipboard
Copied
OK lets call them Templates and lets eliminate the event manger from the picture that just your way of kicking off the process.
What you are doing and what I do is not much different except I'm scripting the whole process and you are using more than one action. I started down that path as well. Your Templates have Alpha Channels named "Picture 1", "Picture 2", ..., "Picture n" mine use "Image n" instead no big deal. The difference is in how you populate Templates and the way I populate Templates. Because I'm scripting the whole process all I need is a single script for it can handle templates with any number of images as long as the image alpha channels are numbered consecutively so when the script can not find "Image n+1" it knows the Collage is complete.
The other big difference between us is how we populate images the collage template. You opening the image copying the image to the clipboard closing the image file and pasting the image into the Template. Where my interactive script uses the alpha camels for placement guide and layer mask so serve two purposes Placement guide and Cropping mask. The user can select any image on their system. I don't one to confine them to a single container. So yes for the first image they have to mouse around to select the folder the image. For the following images the don't have to mouse around unless the image is in a different folder the first one. So when images are populated they can get three form a single folder then switch folders for the next three and so on. Also I do not use Copy and Paste instead I use menu File>Place. After an images is placed into the collage the script transformed it to fit or over fill the selected area and then the script moved the placed image into place over the area. The selection is added as a layer mask so it mask off any over fill. The script then gives the user control is a transform dialog where they can tweak the placement increase the size of the image and or move the image within the cropping layer mask which is unlinked from the image. However there is a special requirement the needs to be followed for this automated placement to work templates and images must have the same DPI resolution there sizes do not matter. The is required because of the way Photoshop implemented "Place" I could program it so that would not need to be required. However the script I would need to open the all the image files and those with a different DPI then the Template would need to have its DPI changed be save for the "Place Automation to Work" Then its DPI restore the original DPI and save again. I did not want that overhead. However if the script did open the image files it would have access to it meta-data.
My Template may optionally have layers over the required Photoshop background images will be place over the background and under the template layers over the background. The Optional Filename stamp text layers are over all layers. Selection of course can be any shape. Make Collages like these very easy to create. Note how Landscape and Portrait mismatch aspect ratio are positioned. These templates have plan white background layes.

Same image into portrait areas

Copy link to clipboard
Copied
I am back to your way and give it another try. I will take me two or three days because I will be a bit busy over the next days.
Stay tuned I might have a few questions.
For me I will have no need to mouse around to find my pictures because they are always in the same folder and never more than 5.
All my pictures are resized and use 240DPI the Templates are also 240DPI I also print in 240PPI on an Epson R1900
BTW. Are you located in NYC? I thought so because of the 9/11 related pictures.
Copy link to clipboard
Copied
North of the city I did work in it for ten years.... There is no need to resize you images Placed images are transformed into the areas The transform effectively resize and resamples the resized image to the templates DPI so IMO it best to keep all your cameras pixels. The reason images and templates need to have the same DPI is so that the Photoshop "Place" operation will place the image in full size without any scaling resize. That way the script can get actual number of Pixels in the image file and also get the areas pixel size and do the correct transformation. Place places the whole image into the template and the script can force the no resize place preference but even with that option Photoshop may scale the image being place to match the templates DPI. If Images and Templates have the same DPI the image is place at 100% scale no scaling is done. Photoshop supports layers up to something like 30,000 by 30,000 Pixels Image layers can be larger, smaller on the same size of the templates canvas size. Places image layers are also smart object layers and can be transformed many times without suffering quality loss from repetitive resizing for the resize is always done from the original placed image.
Copy link to clipboard
Copied
I am playing with it. Here is a sample made with CS4.
I changed the text color. I also used pictures I have saved ishould n my Container Folder at 240DPI for the test.
Tomorrow I will modify one of me Templates with 3 picture.
Should I start a new Discussion over in Photoshop Windows to discuss your automation?
http://www.pixentral.com/show.php?picture=1Jh630PYEIB6HWCRlzI4POH5MDCBF
BTW Norbert Bissinger and Phosphorspitter are the same person.
Copy link to clipboard
Copied
If you want we can take this offline and do it through e-mail just remember I can not type use only two or three fingers and have many typos and spelling errors. Using e-mail will increase my typing and spelling errors. If you have any problem send me the Template file you create.
From what I see you used one of my templates which has a 300 DPI so your images DPI do not match it so they don't get placed correctly. Just eidt my Template Files use image Size check resample and change the DPI setting to 240 DPI to match your image and keep the print size as is. Save the Template you could create a one step action and batch it to change all templates to have your 240DPI setting. Try some of the templates with more thyen one image to get a better feel for how it works.....
Your results will the look more like this 
Copy link to clipboard
Copied
Yes I just wanted to check it out without going to change DPI. Just wanted to see how it works.
Run one of your multiple Template and got an error telling me that it will not work on this version of Photoshop (CS4)
Tonight I will download the trial of CS5 and see what's happening. See Screen Shot. Template was changed to 240 DPI.
We can do it with Email. I too type with a few fingers and am German and my spelling has also some problems.
I do not judge people by their spelling.
Just give me a private message if you want to go the Email rout.
http://www.pixentral.com/show.php?picture=1woN2onJq1F0CQJ6L0A2A0M18okdE7
This one was made with the right DPI.
http://www.pixentral.com/show.php?picture=1Xw0oqVxEMo33WFHnM5lwYu0gUBnJq1
Copy link to clipboard
Copied

That type of message useally happen when Photoshop current state sometimes current target does not support the feature that is being attempted ie like try to clip a layer to an other layer when the currently targeted layer is cilpped to an other layer the clip command is not currently available. Can not tell what the current target was in you screen capture. My script should work in CS4. It also does not look like you running my InteractivePopulateCollage Script. For it will edit the template in a Photoshop Full Screen window with menu Bars. Where the Template has been scalled down in size to make it easier for the user to tweak the image placement when the user is given control in a free transform dialog. Your screen should look something like this. I places one image and tweaked the transform with some rotation. I placed the second image and rotated it in the transform dialog but I cancelled the transform to have the script generate a message at that point I did a screen capture.

Looking at the script code it looks like you ran BatchMultiImageCollage script and you pointed it at the pb3_14x11T2_6x4.psd Template try that again and have the Layers palette visible so we can see the target it should be the Background layer for the first image is placed above the background layer. That template also only has a background layer. Place should be available. I just ran the script and that template and pointed to a source image folder that had three images I resazed the resulting collage and saved it as a jpeg here it is.

Copy link to clipboard
Copied
Modified one of my Templates and run the
script Interactive populatecollage. Worked fine. See here:
http://www.pixentral.com/show.php?picture=1OrqtFnUK27oucetD894lwco4OjA380
and here is the finished product.
http://www.pixentral.com/show.php?picture=1RRZseRrXGfd57GNOr3WthfuWUr4s
Still working on it to see what I can do what works for me. Will take a few hours because have other things to do.
Copy link to clipboard
Copied
I have two displays and keep my paletts on the second one you may have a easier time with it. If you use shift+tab to hide the paletts before you run the script.
The Batch schripts should also work If it continues fail on CS4 which I never had I would like you to be my tester. If it a bug in CS4 Adobe will not fix an old release. I may be able to program around it. The Batch script of course has no interactivity all is automatic many collarges can be created in a single batch run. Templates are populated in the order of Image number 1,2,3.... and stacket on top of ech other image one will be just above the background.
You can add a sequence number prefix to the images filenames followed by a # to sequende how the image will be placed. If you stamp file names on images this prefix number will be stripped off. The text layers added by the script will be the upper most layers in the PSD collage.
While the interactive script does not save the collage the batch scripts always saves completed collages. If the collage is incomplete and the script runs out of source images the incomplete collage will remain open in Photoshop.
Copy link to clipboard
Copied
Gownloaded CS5 trial and run theBatchmultimagecollage script. It runs and I can see in the Layers Pallete that it inserts all pictures but when it finishes I get
the message that it run out of pictures and only the first pictures is shown.regardless which template I use. Still in CS4 no go.
I work without showing the palettes using shortcuts on a laptop.
My pictures in the Container folder are all named Picture 1, Picture 2 up to Picture 5.
Copy link to clipboard
Copied
I sent you a privaye message today to your other userid about some changes I made to the scripts because of what I learnt in this thread. The chances should enable you to set a couple variable in the scripts so the default starting folders will be for you template and image folders. You just need to modify the defaults I set. The root path for my Template Folders is "C:/Program File/Adobe/Adobe Photoshop Templates/" This is I folder I created it is not one that Adobe created the default image root is "~/My Documents/My Pictures/" the users Pictures folder.
About the message lets say you point the script a a template that requires 5 images and you also point it to a image folder that has 26 images. The script will create and save 5 collages into the desternation folder and start to build the sixth collage populate one image and run out of images. At that point the script will put out that message when you click OK the script will end and the sixth collage will remain open in photoshop incompleat. Had there been only 25 image the script would have created and saved five collages and ended with out the error message.
Please download the package again and use the updated scripts. Please also test with CS4 which I do not have do the fail the work for me on CS3 and CS5.
Copy link to clipboard
Copied
Thank you for providing this file open script. I have one problem that I can't solve. I can get the script to open any folder except one I called "Images". Is a folder named "Images" not an allowed name?
Copy link to clipboard
Copied
The scripts as far as I know should be able to process any folder. Which Script, what OS and which release of Photoshop are you running? Also what is the full path of your Images folder and what does the its direcrory lists contain?
Some of the scripts will fail in CS6 if you do not change your Photoshop preferences user interpolation defalt from Adobe's default Bicubic Automatic because of a bug in CS6 scripting Adobe failed to add support for that setting so Scripts that want to preserve the user enviroment will encounter a Photoshop internal error.
Copy link to clipboard
Copied
Thanks for your reply.
I'm using the script you gave in reply 21.
Windows 7, 64bit is the OS.
The path is. Q:/Images
Inside that folder are folders with client names
I've set up other versions of the script with these folders and they worked perfectly.
Q:/Sues Templates
Q:/StudioZap/Templates
It's the Images folder that doesn't work. It gives me a dialog box in the Q: drive.
Any help is appreciated.
Copy link to clipboard
Copied
Forgot. Using CS 5
Copy link to clipboard
Copied
So your script looks like
var dir = Folder('Q:/Images');
var selectedFile = dir.openDlg("Select Image" , "Select:*.nef;*.cr2;*.crw;*.dcs;*.raf;*.arw;*.orf;*.dng;*.psd;*.tif;* .jpg;*.png;*.bmp");
if( selectedFile !=null ){open(File(selectedFile));}
Does the open directory dialog show? If so does it show an empty folder or show your client sub folders? If so do you have a file with one of the following extentions .nef, .cr2, .crw, *.dcs, .raf, .arw, .orf, .dng, .psd, .tif, .jpg, .png or .bmp in there or in your client sub folders:
Copy link to clipboard
Copied
That's the script!
The open directory does show but its the Q: directory. In the box where you would type a filename or something else is the word Images . I can click the OK button and it would take me to the Images folder, but that's an extra step.
Screenshot:

Copy link to clipboard
Copied
It must be your system. Are you sure you have a Images folder on the Q: disk. I just created a Images folder on my G: disk and add two folders to it Client1 and Client2 changed the script to "G:/images" Here is what I see

Copy link to clipboard
Copied
It's really odd. I just created a new folder on my Q: drive called Images2 and put a couple of folders in it. I then duplicated the script replacing the folder to open from Images to Images2. The script works fine using Images2, but not when using Images. Not sure what's causing it but I appreciate your efforts to get it working. Guess I'll have to settle for clicking the OK button to go to that folder.
Thanks again!
Mark
Copy link to clipboard
Copied
Solved it! I had some shortcuts named Images, Images2, Images3 that were in the Q: folder. I guess the script didn't know which one to use so it stopped. They all went to the same Images folder. I deleted those and now it works perfectly.
Thanks again!
Copy link to clipboard
Copied
Yes a shortcut Link would take you to the linked folder
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more