Skip to main content
Parts4Arts
Inspiring
Jan 17, 2022 3:23 PM UTC
Question

#target bridge problem

Hello,

 

I have a problem with a javascript (extendscript) I wrote for AI, PS, ID and IC. See https://www.behance.net/gallery/134777275/Javascript-for-AI-PS-and-ID-restore-files-from-CClib

 

To get it run in Bridge as well I added "target bridge". AI and PS will ignore this line, but ID and IC will start the Bridge instead to run it in ID or IC.

I created two versions: one for AI, PS, ID and IC (without #target) and one for Bridge (with #target).

But I think, that can't be the best solution, can it?

 

If there no #if #else like in C++ to check which #target is the right one?

 

– j.

This topic is closed to new replies. Start a new post to keep the conversation going.

7 replies

Legend
Jan 17, 2022 4:33 PM UTC

How are you loading and invoking this script?

Translate
Parts4Arts
Inspiring
Jan 17, 2022 5:58 PM UTC

Just a simple example

#target bridge
alert("Hello world!");

I start the .jsx file by double click in adobe bridge (A), 

I get the warning (B) and than I see the jsx running (C).

(Screenshot from a other project.)

 

Translate
Legend
Jan 17, 2022 9:00 PM UTC

Don't do that.

You can load your script in the Bridge Startup Scripts folder or one of the Adobe folders that all CC apps look in.

Translate