Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Importing files from Bridge into a stack in Photoshop

New Here ,
Apr 24, 2008 Apr 24, 2008
Hi guys,

Photoshop has a great function of loading files into a single stack, so as not to have many 10's of files to open. Bridge on the other hand allows for better viewing and navigation through folders etc. Just wondering if it was possible to select all the files you wanted open to a stack from bridge but these then to open in photoshop in a single psd file. It is possible to open all the files from Bridge then run the load in stack from the open files but then you have to close each file manually.

Not sure if a photoshop script can be drag 'n' dropped into Bridge and load from there once the files have been highlighted. If so which folder as there are already Photoshop scripts avaliable in Bridge but cant seem to find how or where they are stored.

Any help would be much appreciated. Many thanks in advance.
TOPICS
Scripting
2.8K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 28, 2008 Apr 28, 2008
Any idea's guys and girls.....?

Would also be possible if I could make a selection of the highlighted files in Bridge, then go back to Photoshop/open and it remember or recall those files I highlighted in Bridge. Then run the script from there. Either way would work.

Thanks again.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 28, 2008 Apr 28, 2008
This seems to work.<br />Select your files in bridge then run script from Photoshop.<br />It should open all your files, call "Load Files into Stack.jsx"<br />Click the button "Open Open Files" it will then stack your files and then close all files except your new stacked file.<br />Most of the script is from Xbytor.<br />Paul.<br /><br />BridgeTalk.prototype.ah_getBTSpecifier = function (tApp) { <br /> if (BridgeTalk.appName == tApp) return tApp + '-' + app.version.replace(/\..*$/,"") <br /> else if (BridgeTalk.appName == 'bridge' && tApp == 'photoshop') { <br /> return tApp + '-' + Number(Number(app.version.replace(/\..*$/,"")) + 8 ) ;} <br /> else if (BridgeTalk.appName == 'photoshop' && tApp == 'bridge') { <br /> return tApp + '-' + Number(Number(app.version.replace(/\..*$/,"")) - 8 ) ; <br /> } <br />} <br /><br />BridgeTalk.prototype.sendSynch = function(timeout) { <br /> var self = this; <br /> self.onResult = function(res) { <br /> this.result = res.body; <br /> this.complete = true; <br /> } <br /> self.complete = false; <br /> <br /> self.send(); <br /> <br /> if (timeout) { <br /> var i = 0; <br /> while(!self.complete) { <br /> BridgeTalk.pump(); // process any outstanding messages <br /> $.sleep(1000); <br /> if (i == timeout) { <br /> if (!confirm("Still Collection Bridge Data, Continue?")) return; <br /> else i = 0; <br /> } <br /> else i++; <br /> } <br /> } <br /><br /> var res = self.result; <br /> self.result = self.complete = self.onResult = undefined; <br /> return res; <br />}; <br /><br />function getBridgeSelectionsAsString() { <br /> function getBridgeFiles() { <br /> var v = app.document.selections; <br /> var files = new Array(); <br /> for (var i = 0; i < v.length; i++) { <br /> files = v.spec; <br /> } <br /> return files; <br /> } <br /><br /> if (BridgeTalk.appName != "photoshop" || BridgeTalk.appVersion.replace(/\..*$/,"") < 9) { <br /> alert("This only works from Photoshop CS2/CS3"); <br /> return; <br /> } <br /> <br /> var bt = new BridgeTalk(); <br /> var bridgeApp = bt.ah_getBTSpecifier("bridge"); <br /> if (!BridgeTalk.isRunning(bridgeApp)) { <br /> alert("Please launch " + bridgeApp + " then click OK"); <br /> if (!BridgeTalk.isRunning(bridgeApp)) return; <br /> } <br /> bt.target = bridgeApp; <br /> bt.body = getBridgeFiles.name + "();" + getBridgeFiles.toString(); <br /> return bt.sendSynch(2); <br />} <br />var Names = new Array;<br />var fileList = getBridgeSelectionsAsString(); <br />fileList = fileList.split(',');<br />for (var a = 0;a<fileList.length;a++){<br /> var file = new File(fileList);<br /> Names.push(file.name);<br /> open(file);<br /> }<br /><br />$.evalFile(Folder.appPackage...);<br /> activeDocument.close(SaveOptions.DONOTSAVECHANGES);<br />}
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 29, 2008 Apr 29, 2008
Hi Paul,

Thanks for your help in finding a possible solution. I am not very keyed up on scripting or coding. Not sure what or where I am supposed to put the above code and how to run it once I have selected my files in Bridge. Any chance of an idiots step-by-step? :)

Sorry to be a pain but hopefully if it all works should save me a bit of time, so thanks for that.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 29, 2008 Apr 29, 2008
No problem, save the code as FileName.jsx this can be saved anywhere you like, but if you are going to use it frequently save it in :
C:\Program Files\Adobe\Adobe Photoshop CS3\Presets\Scripts folder
To run the script File - Scripts and select the script if in the above Folder. If not File - Scripts - Browse (to where you save it)

You can also create an action to call the script or Create a Keyboard Shortcut.
Edit - Keyboard Shortcuts - File go down to the script and assign your key prefference.

Paul.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Apr 30, 2008 Apr 30, 2008
Thanks for your quick response again. Just got home and tried it. Keep getting "Error 18: Variable or value expected" come up. I am selecting my files in bridge, then opening up Photoshop and running the script. Is this the correct way to use it? I have also seen another online script called Dr.Browns which seems to do a very similar function. Are you aware of this script? Tried to install this to test it but again keep getting errors!!

Cheers

Jaimie
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Apr 30, 2008 Apr 30, 2008
I wonder what program you have used to save the script?
It must text. Using word and some other text editors can add characters to the script and cause problems. The best thing to do is start ExtendScript Toolkit and copy and paste in. Pressing F7 will then do a syntax check. From there you can save the script.

Paul.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2008 May 01, 2008
Hi Paul,

Worked it out in the end, did what you said. Works very well, hats off to you! One thing would be extremely good to add to it though, but probably impossible. When you run the script for the load files to stack it would only recognize the selected files from Bridge and bypass the "Load layers/Add Open files". Not a major problem, it would just be a bit more streamlined and few less mouse clicks of the mouse but thats just being extremely picky.

If not possible then thanks for all your help,
very more appreciated.

Jaimie
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 01, 2008 May 01, 2008
Sorry Jaimie, it would require modifing the "Load Files into Stack.jsx"

Paul.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 01, 2008 May 01, 2008
Ah, no probs. Thought it was very unlikely.

Many thanks again.
Jaimie
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
May 02, 2008 May 02, 2008
Hi Paul, Works fine on a PC. Just tried it on a Mac but getting errors. File or folder doesn't exist line 61.

Just wondering if this was only supposed to work on a PC platform.

Cheers,
Jaimie
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
May 02, 2008 May 02, 2008
Hi Jaimie, I only have a pc, the problem is where the file is located on a mac.

This is the error line:
$.evalFile(Folder.appPackage+"/Presets/Scripts/Load Files into Stack.jsx");

Maybe "Load Files into Stack.jsx" is kept in a different folder?

Paul.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Feb 21, 2009 Feb 21, 2009
LATEST
Hello,
I would like to import multiple images to an existing PS file (to create collage using a template)- can this script help? So far I can only get Bridge to load multiple to a new doc not existing.
Thanks
O
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines