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

Need script to remove extra channels and paths automatically for saving out final images

New Here ,
May 02, 2021 May 02, 2021

Hi I work professionally and my clients all require all paths removed and no extra channels for when I send over final tiffs. I have used scripts in the past that have worked perfectly in previous companies, which I now don't have access to.

 

By any chance has anyone got a script already made that does this? I've tried looking it up myself and even creating one but it really just goes over my head and don't really understand any of it. So really hoping someone has made one already for their own workflow

 

Thank you very much!

Niall

TOPICS
Actions and scripting
2.4K
Translate
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 3 Correct answers

People's Champ , May 02, 2021 May 02, 2021
with (app.activeDocument)
    {
    pathItems.removeAll(); 
    channels.removeAll(); 
    }
Translate
New Here , May 02, 2021 May 02, 2021

all fixed now. For future people looking into the same thing I used R-bin's code in TextEdit to create my script then saved it in my photoshops script folder.

 

For my personal workflow, I thought it best to have an action that solely runs that script. So as I create an action at the end of each job to save all my files in the correct formats for that specific client, I will run my action that has this script in first and then follow with the saving files, etc needed. This is exactly what I need t

...
Translate
Community Expert , Apr 12, 2023 Apr 12, 2023

@damiano.f – You didn't read my blogpost carefully enough! :]

 

You saved it as RTF (Rich Text Format)

 

Mac: Apple TextEdit (ensure that the Format menu is set to Plain Text mode, not Rich Text mode)

 

As you have removed "half" of the code, you could now simplify the script to:

 

activeDocument.channels.removeAll();

 

 

Translate
Adobe
People's Champ ,
May 02, 2021 May 02, 2021
with (app.activeDocument)
    {
    pathItems.removeAll(); 
    channels.removeAll(); 
    }
Translate
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 ,
Apr 12, 2023 Apr 12, 2023

that is brilliant!!! how do you actually implement that? how do I load that script into photoshop after writing in on text edit?

many thanks,

Translate
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 ,
Apr 12, 2023 Apr 12, 2023
quote

that is brilliant!!! how do you actually implement that? how do I load that script into photoshop after writing in on text edit?

many thanks,


By @damiano.f

 

All is explained here:

 

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html

 

  1. Copy the code text to the clipboard
  2. Open a new blank file in a plain-text editor (not in a word processor)
  3. Paste the code in
  4. Save as a plain text format file – .txt
  5. Rename the saved file extension from .txt to .jsx
  6. Install or browse to the .jsx file to run

https://prepression.blogspot.com/2017/11/downloading-and-installing-adobe-scripts.html#Photoshop

Translate
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 ,
Apr 12, 2023 Apr 12, 2023

Save the code as a txt-file, change the extension to .jsx and copy it into Photoshop’s Presets/Scripts-Folder; after restarting Photoshop it should be available under File > Scripts and can be assigned a Shortcut or used in an Action. 

Translate
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 ,
Apr 12, 2023 Apr 12, 2023

Thank you both guys, I'm getting the syntax error message.

 

Since I only need the script to remove the channels, I have deleted the rest of the original script, so here;s what it looks like 

with (app.activeDocument)
{
channels.removeAll();
}

 

Anything i'm doing wrong?

Translate
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 ,
Apr 12, 2023 Apr 12, 2023

@damiano.f – You didn't read my blogpost carefully enough! :]

 

You saved it as RTF (Rich Text Format)

 

Mac: Apple TextEdit (ensure that the Format menu is set to Plain Text mode, not Rich Text mode)

 

As you have removed "half" of the code, you could now simplify the script to:

 

activeDocument.channels.removeAll();

 

 

Translate
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 ,
Apr 12, 2023 Apr 12, 2023
LATEST

Thank you so much for the prompt response! you made my day really grateful!

Translate
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 ,
May 02, 2021 May 02, 2021

If you need to remove all channels/paths except spot/clipping:

 

https://community.adobe.com/t5/photoshop/free-script-remove-selected/m-p/10104624

Translate
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 ,
May 02, 2021 May 02, 2021

You mention automatically... Where and how in your workflow do you wish to do this?


When you have a single file open?


All open files?

 

Batching existing files in a folder?

 

Something else?

 

Translate
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
New Here ,
May 02, 2021 May 02, 2021

all fixed now. For future people looking into the same thing I used R-bin's code in TextEdit to create my script then saved it in my photoshops script folder.

 

For my personal workflow, I thought it best to have an action that solely runs that script. So as I create an action at the end of each job to save all my files in the correct formats for that specific client, I will run my action that has this script in first and then follow with the saving files, etc needed. This is exactly what I need to speed up my workflow. I have included a screenshot of my action in case it helps someone else out in the future with the same issue

 

Thanks Everyone

Niall

Translate
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