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

scripting for Photoshop (how to write Javascript code to "open" a file, and "save as")

Community Beginner ,
Aug 21, 2023 Aug 21, 2023

Copy link to clipboard

Copied

Hi guys,

I am new to scripting for Photoshop. I am using Javascript.

How do I write code in Javascript to open a file (e.g. a jpeg) in Photoshop? And how do I write code to save it as e.g. a PSD, EPS etc?

Will really appreciate the help.

Thanks.

TOPICS
Actions and scripting

Views

117

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 Expert ,
Aug 21, 2023 Aug 21, 2023

Copy link to clipboard

Copied

It depends on whether you want to use Document Object Model- or Action Manager-code. 

 

This pdf should cover the DOM-methods (for document in the case of saving as, for application in the case of opening a file). 

photoshop-javascript-ref-2020.pdfGitHubhttps://github.com › blob › master › Documentation

Screenshot 2023-08-21 at 16.08.17.pngScreenshot 2023-08-21 at 16.08.45.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
Community Beginner ,
Aug 22, 2023 Aug 22, 2023

Copy link to clipboard

Copied

Thanks alot! Let me try it out.

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 Expert ,
Aug 22, 2023 Aug 22, 2023

Copy link to clipboard

Copied

@Joseph25509234xr72 – When first startng scripting (and even today), I often struggled with the official docs, I found them useful to dissect example code, but had major issues using them to write code from scratch.

 

Searching this forum for keywords such as:

 

.saveAs(

 

or

 

 
or
 
 
or
 
 
or
 
 
Will help you to find full working code examples which may help in addition to the docs.
 

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 ,
Aug 25, 2023 Aug 25, 2023

Copy link to clipboard

Copied

LATEST

@Stephen_A_Marsh 

 

I have really been struggling with this. The official docs usually just give the format, but not many practical examples.

I got frustrated to the point I decided to just post here in the community for help.

 

Thanks alot

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