Skip to main content
New Participant
February 26, 2017
Question

Step by Step - Create a new document in Javascript for Photoshop CC 2015

  • February 26, 2017
  • 2 replies
  • 8122 views

I'm trying to create a step by step walkthrough in Javascript to show how to create a new document within Photoshop CC 2015. The main steps are;

Drop down the File menu.

Select New

Select Document type

Create Document.

Ideally I'm trying to create individual steps and not automate as I want to show each step. I think it would probably have to be made from 4 different js files.

Let me know if you have any questions.

Cheers,

Mark

This topic has been closed for replies.

2 replies

Tom Ruark
Inspiring
February 27, 2017

I would suggest using AppleScript and OS Events. I found this old article using the Finder application as an example. Other online searches might get you better results.

A better way to activate menu items from AppleScript - Mac OS X Hints

JJMack
Community Expert
February 26, 2017

Create a document or do you actually mean open an image file and if open what kind of  image file. Different image formats have different open options. And RAW file would be opened through ACR.

JJMack
Mbailey92Author
New Participant
February 26, 2017

Hi, thanks for your response,

I literally mean. when the user runs a script the file menu drops down.

JJMack
Community Expert
February 26, 2017

First you need read Adobe Scripting Guide and Adobe DOM Javescript reference and understand the need for Adobe Scriptlistener Plug-in and what Action Manager Code is about.  I do not know javascript but I can hack at Photoshop Scripts.  You need to also be able to look at Photoshop scripts and be able to figures out what they are doing.

What you seem to want to do is show how Action manager code may be used perhaps.   There is no dialog need to create a document. Photoshop UI has a Dialog so a user can set size,resolution, color depth, canvas type transparent or background color color space etc. ,

A script can create a UI interface using code to create UI dialog, using Adobe ScriptUI support,  Adobe does not provide a DOM UI for a new document you would need to program one of use Action Manager code.

Use code to use a Photoshop menu item. it would not be the file menu you show it wold be the New Document Dialog or prehaps the ned New Document Workspace.

JJMack