Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Script to check the application is available or not

Participant ,
Mar 19, 2021 Mar 19, 2021

Copy link to clipboard

Copied

Hi all

 Using indesign javascript how to check the application is available in the mac or not

 

 

TOPICS
Scripting

Views

169

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 19, 2021 Mar 19, 2021

Copy link to clipboard

Copied

Sorry, but I don't understand. What script are you looking for?

 

Or are you writing a JavaScript to see if InDesign is installed on the machine?

ABAMBO | Hard- and Software Engineer | Photographer

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 21, 2021 Mar 21, 2021

Copy link to clipboard

Copied

You can check for an Adobe app you want to target with the Bridgetalk class getSpecifier method:

 

 

 

var targetApp = BridgeTalk.getSpecifier( "photoshop");

if( targetApp ) {
  $.writeln("Photoshop is available")
} else {
    $.writeln("No app by that name")
}

 

 

 

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

Thanks, Rob!

Hi Rocky, with Rob's code you could be even more specific.

If you need to know for example if any version of InDesign 2021 is available, you could test this like that:

var specificVersionString = "indesign-16.064";
var targetApp = BridgeTalk.getSpecifier( specificVersionString );

if( targetApp )
{
	$.writeln( specificVersionString + " is available")
} else
{
	$.writeln("No app by that name " + specificVersionString )
};

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

Hi Uwe, I couldn’t get the versioning to work. I’m running InDesign 2020 and this returns false

var specificVersionString = "indesign-15.0.1.209";

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

It works if I get the version via the diagnostics property, which returns 15.064, but that’s not the version About InDesign  displays...

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

Hi Rob,

the explanation for this: "15" is the main version, "064" means 64 bit application.

You cannot have two or more versions of the same main version of InDesign installed and running side by side. So this is sufficient to see, if InDesign 2020 is installed at all. For a more detailed look you have to start InDesign and use app.version on it.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

You could also exploit the string that is returned by that:

BridgeTalk.__diagnostics__;

 

For example if you need to know the file path to the installed application.

 

FWIW: This all is "only" working for apps that are able to work with ExtendScript's BridgeTalk class.

If you need the information about applications that are not Adobe or will not work with the BridgeTalk class you must go a different way. Perhaps best with AppleScript executed by ExtendScript. But AppleScript is out of my field of knowledge.

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

Ah. Something I forgot: Check, what this will return:

apps

More revealing perhaps:

var result = apps;
result.sort().join("\r")

 

Regards,
Uwe Laubender

( ACP )

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 22, 2021 Mar 22, 2021

Copy link to clipboard

Copied

LATEST

Hi Rocky

To check wheather indesign is available or not   run this code//////////////////////////

 

 

if ($.os.toString().match("Windows", "i")){
Pc = "Windows";
if(app.name.indexOf("Adobe InDesign") !=-1){
alert("Adobe indesign Available in windows")
}
}else
if($.os.toString().match("Macintosh", "i")){
pc="Macintosh";
alert(pc);
}

Likes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines