I'm trying to get my ImageIngester (basepath.com/ImageIngester) program to not only launch or switch to Bridge, which it does already, but to then get Bridge to execute a script that, for example, might tell it to apply Camera Raw defaults.
Of course, once Bridge is running, it's easy for the USER to run a script from a menu. And, there are various ways to get it to run a fixed startup script, or even an ad hoc script, when it gets launched.
But, for a smooth workflow, you want to be able to get Bridge to run a script whether it's launched or not. It's too awkward to quit Bridge just to make sure your workflow proceeds normally. (Quitting an app just to run that same app is counter-intuitive and is a perfect example of why so often computers are no fun at all.)
So... does anyone know how to do this?
When I run the following script from INSIDE ExtendScript Toolkit:
it does exactly what I want, whether Bridge is running or not. But, if the script (bridge1.jsx) is run like this, from the command line (ExtendScript Toolkit not running):
'ExtendScript Toolkit' -run /Users/marc/development/Scripts/bridge1.jsx
it launches Bridge OK, which means that ExtendScript Toolkit gets launched OK and it starts running the script (how else would it know that the target is Bridge?), but the browseTo is not effective--Bridge opens the folder where it last was. That is, Bridge ignores the browseTo whether it's getting launched or was already running.
I don't care especially about the differences between running a script from ExtendScript Toolkit's GUI or its command line. In fact, I have no interest in running ExtendScript Toolkit at all. All I'm looking for is a way to get Bridge to run a script that's coming from the outside.
Anyone know the answer(s)?