Skip to main content
jasonp49818280
Inspiring
January 11, 2024
Answered

Passing Bridge Parameters into a photoshop script

  • January 11, 2024
  • 2 replies
  • 443 views

So I am getting into Bridge Javascripting and I am looking at passing scripts to Photoshop. Is there a way to have Bridge call another Javascript file but also pass parameter to it. I know I need to use bridge talk but I really dont want to write all the code as a single line string

 

as a very simple test I had Bridge open selected PNGs, Trim them, and then close them,. I did this all as a single line string. (this was just a test, that was an action I could batch before, but I felt it would be a good starting point.)

 

what I would love to do is write a "Trim" script and then pass the file into it (Example: TrimIt(A.png). The main reason I would want a script is I am going to be building a lot of these different functions (20-30) and I would love to not store them all in a single 10,000 line code file. and also not store them as single line strings for sending out through bridge. has anyone done soimething simialr to this so you can show me your system for doing this?

This topic has been closed for replies.
Correct answer jasonp49818280

So I ended up solving this by creating two functions. One to run scripts and one to save files.

 

the save files just records all the selections into a csv file, and then the script uses that csv file to do its thing. I can post them if anyone wants.

2 replies

jasonp49818280
jasonp49818280AuthorCorrect answer
Inspiring
January 17, 2024

So I ended up solving this by creating two functions. One to run scripts and one to save files.

 

the save files just records all the selections into a csv file, and then the script uses that csv file to do its thing. I can post them if anyone wants.

Legend
January 11, 2024

Use Batch and run PS scripts from a Photoshop action.

jasonp49818280
Inspiring
January 11, 2024

I know I could do that for this example, but I will be doing things that are not always going to be Photoshop specific. And for that the batch option wont work. Some things will be Illustrator, InDesign, and some will be using Illustrator and Photoshop all within the same script.