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

Executing a Ps script from Bridge

Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Br 12

Ps 23

 

I have been running the Ps script 'Load files into stack' with the option checked to create a Smart Object. Then going to Ps>Layers>SmartObject>StackMode & selecting the blend mode

I have to navigate from Ps to find the files in Br (sometimes they arent in their own folder>.

Ideally, I'd like to select the thumbnails in Bridge and run the Ps script.

CIs there a simple solution (I can't code) ?

TOPICS
Batch , How to , Scripting

Views

2.6K

Translate

Translate

Report

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

correct answers 4 Correct answers

LEGEND , Feb 17, 2022 Feb 17, 2022

1) go to your 'Adobe\Adobe Photoshop 2022\Presets\Scripts' folder

2) to make it work like in Photoshop change in 'Load Files into Stack.jsx':

 

		this.stackLayers();
	else
		return 'cancel';
}

loadLayers.intoStack = function(filelist, alignFlag)
{

 

to:

 

 {sE = this.stackElements; filelist = []; for(i in sE) filelist.push(sE[i].file); alignFlag = loadLayers.createSmartObject = true} else return 'cancel'

 

3) relaunch both applications

4) select your thumbnails in Bridge

5) Tools > Photoshop >

...

Votes

Translate

Translate
LEGEND , Feb 17, 2022 Feb 17, 2022

You don't touch Stack Script Only folder. It's library for scripts from upper folder.

 

You may edit in TextEdit, but you must write file down in same encoding that is now.

 

Yes, you understand me correctly about which part you have to replace by which other.

 

After you click Bridge item to run script the dialog will not pop up. Stacking will started.

Votes

Translate

Translate
LEGEND , Feb 17, 2022 Feb 17, 2022

Chose first 'TextEdit -> Preferences -> Plain Text' before you save .jsx file.

 

Replace:

 

alignFlag = loadLayers.createSmartObject = true

 

to:

 

with(ScriptUI.environment.keyboardState) alignFlag = ctrlKey, loadLayers.createSmartObject = shiftKey

 

and when running script from menu hold Shift for Smart Object, Control for non-alligning

Votes

Translate

Translate
LEGEND , Feb 18, 2022 Feb 18, 2022

loll I had to read wrongly your yestarday post or something made me to change my mind regarding correct behaviour as to the use of Control key. The ! character is not needed! 😛

 

When Shift and Ctrl are used the layers neither will be aligned nor smart object created.

 

When Control is used, you'll have aligned layers, when Shift, then Smart Object Created.

 

 

EDIT: I read that post and found what confused me. You said something that already worked right way. So I thought if you say it doesn't

...

Votes

Translate

Translate
LEGEND ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

You can do it with BridgeTalk method.

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Thank you but I don't know what BridgeTalk is? As I said I can't code if that's what it is. I need a simple solution.

Votes

Translate

Translate

Report

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 Expert ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Russell Brown's Services: stack-o-matic script does this for Bridge into Photoshop.

 

http://www.russellbrown.com/scripts.html

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Please see screenshot. Is this the one you refer to & will it work with the latest version of Ps & Br ?

Votes

Translate

Translate

Report

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 Expert ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

I'm away from the computer but when able I'll verify versions.

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Thank you . When you do get a chance to verify, could you also please verify that this is the Extension Manager it says to use for installation? Baby steps please on how I go about this installation, then the script installation. https://www.adobe.com/exchange/em_download/

Votes

Translate

Translate

Report

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 Expert ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

I'm guessing that the script has migrated from version to version as I don't recall installing it recently but it is still there.

 

There is also the load files into layers under Photoshop tools in Bridge.

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

I used the Load Files into layers but the Ps script has the additional Smart Object checkbox (& also an option to attempt to align the layers). The load files into layers does just that  - a bunch of layers.

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

1) go to your 'Adobe\Adobe Photoshop 2022\Presets\Scripts' folder

2) to make it work like in Photoshop change in 'Load Files into Stack.jsx':

 

		this.stackLayers();
	else
		return 'cancel';
}

loadLayers.intoStack = function(filelist, alignFlag)
{

 

to:

 

 {sE = this.stackElements; filelist = []; for(i in sE) filelist.push(sE[i].file); alignFlag = loadLayers.createSmartObject = true} else return 'cancel'

 

3) relaunch both applications

4) select your thumbnails in Bridge

5) Tools > Photoshop > Load Files...

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Thank you for this.

 

Ps 2022>Presets>Scripts> Load files into stacks.jsx 

There is also a sub-folder Stack Scripts Only.

Do I ignore and leave this alone ?

 

App to open the file - is TexEdit ok?

 

Do I just Cut the portion from this. to {

and Paste the portion you wrote from this. to 'cancel'

 

In your step 5 - Tools>s>Load files...

What exactly would I see different from what is currently there? Would it be the same dialog as when you go to Ps>Scripts>Load files into stack?

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

You don't touch Stack Script Only folder. It's library for scripts from upper folder.

 

You may edit in TextEdit, but you must write file down in same encoding that is now.

 

Yes, you understand me correctly about which part you have to replace by which other.

 

After you click Bridge item to run script the dialog will not pop up. Stacking will started.

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Not sure what you mean by -

You may edit in TextEdit, but you must write file down in same encoding that is now.

Can I not Cut  and Paste - will it be incorrect? (see attached)

 

It is a locked file and will only let me change it in a duplicate file. Do I save the duplicate and then rename it to the same as the original and replace it?

 

If I dont get a dialog how do I control whether 

1. if it will create a smart object or not from the layers

2. if it will try and align the layers or not (as per the script in Ps)

 

I will attach the edited duplicate file for you to see if it's correct

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Chose first 'TextEdit -> Preferences -> Plain Text' before you save .jsx file.

 

Replace:

 

alignFlag = loadLayers.createSmartObject = true

 

to:

 

with(ScriptUI.environment.keyboardState) alignFlag = ctrlKey, loadLayers.createSmartObject = shiftKey

 

and when running script from menu hold Shift for Smart Object, Control for non-alligning

Votes

Translate

Translate

Report

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
Contributor ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Almost there....

 

You say - and when running script from menu hold Shift for Smart Object, Control for non-alligning

 

I replaced the script & it seems to be running ok, with the files loading as layers.

 

Then, if I hold the Shift key while launching the script, it collapses the layers into a Smart Object.

So far, so good.

 

I need a little further clarity -

Question 1: If I want it to either align or not align the layers, you say to hold or not hold the Control key?

I tried holding it & it gave a non-aligned result that looks very different to leaving that box un-checked in the Ps script dialog

Question 2: What do you do if you want both Smart Object And non-aligned

 

Thanks for all this help. Much appreciated

 

 

 

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 17, 2022 Feb 17, 2022

Copy link to clipboard

Copied

Loll I was sure it will confuse you, but I left it as it's default behaviour to allign layers? Anyway if you want it to be more intuitive then in the script change:

 

ctrlKey

 

to:

 

!ctrlKey

 

Then for Alligned layers & Smart Obejct you simply hold both Ctrl and Shift keys 😉

Votes

Translate

Translate

Report

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
Contributor ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

As you may have seen in the thread I was side-tracked trying to install Russel Browns scripts (which are not meant for newer Ps versions) & ended up with both Bridge & Ps not working correctly. I restored my hard drive overnight with Time machine & am now back to square one.

 

I have your  'Load files into stack' script ready to go back in but will just work with my computer for a while to be sure it's stable again.

To confirm the path - HD/Applications/Ps 2022/Presets/Scripts

 

I am not clear on the modification you just posted regarding the Control key - questions below.

 

Please confirm -

Shift key to create a Smart Object after layers are loaded - with only the Shift key are layers aligned or Not aligned?

I'd prefer by default to Not want them aligned.

 

As the script is now-

Ctrl key creates aligned or not aligned ?

 

If I find & change Ctrl to !Ctrl = then does it create aligned or not aligned?

Holding both Ctrl+Shift = ?

Holding both !Ctrl+Shift = ?

 

Sorry, to ask these not so astute questions but it's been a long nght trying to restore my computer and my brain isnt up to speed yet

 

Thanks again for all the help.

 

 

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

When you add exclamation mark the behaviour will be reversed, so for aligning you'll have from now on to hold Ctrl key, that means deafult will be non-aligning. Similarly for creating Smart Objects, that doesn't change. So no key for just layers, while Shift if you want to end up with placed layer. Holding together Shift & Ctrl let you make aligned layers as Smart Object.

Votes

Translate

Translate

Report

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
Contributor ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Before I replace the original with your modified script

Is this the line where you suggest adding ! before the ctrlKey ?

with(ScriptUI.environment.keyboardState) alignFlag = ctrlKey, loadLayers.createSmartObject = shiftKey

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Yes, there is no other instance of ctrlKey in the code 😉

Votes

Translate

Translate

Report

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
Contributor ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Nope. Not working. I have attached the modified script for you to see.

 

Shift key  - makes a smart object & attempts to align layers

Ctrl key - loads layers but no smart object & no attempt to align

No keys - no smart object & attempts to align

Cntrl & Shift -  makes smart object & does Not attempt to align

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

loll I had to read wrongly your yestarday post or something made me to change my mind regarding correct behaviour as to the use of Control key. The ! character is not needed! 😛

 

When Shift and Ctrl are used the layers neither will be aligned nor smart object created.

 

When Control is used, you'll have aligned layers, when Shift, then Smart Object Created.

 

 

EDIT: I read that post and found what confused me. You said something that already worked right way. So I thought if you say it doesn't work as intended I did something wrong. Now we see I didn't, just see what you said: "I tried holding it (ie. Control) & it gave a non-aligned".

Votes

Translate

Translate

Report

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
Contributor ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Apologies for creating confusion.

 

Everything appears to be correct now.

no key - layers are loaded

shift - creates smart object

ctrl - align layers

shift+ctrl - smart object & align layers

 

I appreciate your help and patience staying with it until it is all working properly - Thank You !

Votes

Translate

Translate

Report

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
LEGEND ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Now I found I made mistake as well that led you into your mistake.

In a post preceding 'that post' I wrote 'Control for non-alligning' 😄

Votes

Translate

Translate

Report

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
Contributor ,
Feb 18, 2022 Feb 18, 2022

Copy link to clipboard

Copied

Do you think that when Photoshop updates that it will overwrite / replace this file?

Votes

Translate

Translate

Report

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