Skip to main content
Parts4Arts
Inspiring
January 17, 2022
Question

#target bridge problem

  • January 17, 2022
  • 1 reply
  • 810 views

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 has been closed for replies.

1 reply

Legend
January 17, 2022

How are you loading and invoking this script?

Parts4Arts
Inspiring
January 17, 2022

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

Legend
January 17, 2022

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.