The DAM Forum
Welcome, Guest. Please login or register.
April 20, 2014, 08:51:56 AM

Login with username, password and session length
Search:     Advanced search
28003 Posts in 5130 Topics by 2912 Members
Latest Member: kbroch
* Home Help Search Login Register
+  The DAM Forum
|-+  Software Discussions
| |-+  Scripting
| | |-+  Getting Bridge to run a script
« previous next »
Pages: [1] Print
Author Topic: Getting Bridge to run a script  (Read 3306 times)
Marc Rochkind
Hero Member
*****
Posts: 1136


View Profile WWW Email
« on: April 01, 2006, 10:21:17 PM »

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?

More detail:

When I run the following script from INSIDE ExtendScript Toolkit:

#target "bridge"
app.browseTo("/Users/marc");

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)?

--Marc
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!