Copy link to clipboard
Copied
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?
1 Correct answer
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.
Copy link to clipboard
Copied
Use Batch and run PS scripts from a Photoshop action.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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.

