• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to get Photoshop OS info (Mac or Win) in UXP JavaScript?

Contributor ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

I'm converting CEP/ExtendScript to UXP JavaScript.

 

Is there way to tell if the system is Mac or Win in UXP JavaScript?

 

OS info (Mac or Win) can be get as following in CEP environment.

 

// CEP JavaScript
var isMac = (navigator.platform == "MacIntel");

// ExtendScript
var isMac = (0 == $.os.indexOf("Mac"));

 

 

But I could not find on UXP JavaScript environment.

 

How can I get this info (Mac or Win) in UXP Scripting?

 

Note: I checked around API doc, global object and require('photoshop') objects, but I could not find.

TOPICS
Actions and scripting

Views

471

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

correct answers 1 Correct answer

People's Champ , Jul 14, 2021 Jul 14, 2021

I don't know anything about it at all.

 

But I guess

require('os').platform()

 

Not? : )

Votes

Translate

Translate
Adobe
LEGEND ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

UXP Plugin Photoshop + Read write XMP data + XMP lib:AdobeXMPScript
I link these UXP threads to show there are no answers for aksed questions.

Did you try on dedicated UXP forum? Did anyone answer over there?

Votes

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
Contributor ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

In general, pointing wroing direction is not appriciated.

I don't think there is dedicated UXP forum as up current.

UXP is already in PS.

But CEP plugin has no support on M1 Native Photoshop.

Other apps except Photoshop are announced support CEP11 on M1 Native.

To make plugin work on M1 Native, UXP is only way curretnly available.

Votes

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
LEGEND ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

LATEST

So you say that participation on the forum lead by creators of UXP who actively are in touch with users is wrong direction? But staying on 'desert' where you can get a tip by luck is okay?

 

You don't think there's dedicated UXP forum? Why, if someone is guaranting it to you? What are your reasons to say so? You just can go there and see it on your own, can't you? 😕

 

CEP for Photoshop has also its own forum, but probably you wouldn't appreciate my good will to show you right direction 😉 "I want it to be that, so this is what I believe it is", really?

Votes

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
People's Champ ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

I don't know anything about it at all.

 

But I guess

require('os').platform()

 

Not? : )

Votes

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
Community Beginner ,
Jul 15, 2021 Jul 15, 2021

Copy link to clipboard

Copied

@r-bin 

It works!

Thank you very much.

 

ss_20210715_094043_019.png

Votes

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