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

Copy and Paste Guides - Photoshop 2024

New Here ,
May 01, 2024 May 01, 2024

I had a script that worked in photoshop 23 where I could copy and paste guides from one document to another, but it is not working in the new version of Photoshop.  Does anyone have an updated script or know how to fix this problem? 

TOPICS
Actions and scripting , macOS
7.1K
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 1 Correct answer

People's Champ , May 04, 2024 May 04, 2024
quote

Sorry, it’s reported on line 53. Here are lines 52 and 53 for context from the previous code posted:

 

 

 

 

 

var desc1 = app.getCustomOptions('7a301ec0-afde-11e1-afa6-0800200c9a66');
var layerGuides = eval(desc1.getString(0));

 

 

 


By @Stephen Marsh

 

 
Could you use a key value other than 0 when using the putString and getString function?
It seems that the getCustomOptions function still returns the found descriptor and does not generate an error.
Many built-in scripts use the putCustomOptions and getCus
...
Translate
Adobe
Explorer ,
May 06, 2024 May 06, 2024

Can you post the fixed old script?

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 06, 2024 May 06, 2024

@filips97187540 

 

I'm on a mobile phone at the moment, so no. But it's as I previously wrote, just find the following two bits in the script changing 0 to 1:

 

desc2.putString(1, currentGuides.toSource());

 

var layerGuides = eval(desc1.getString(1));
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 ,
May 06, 2024 May 06, 2024

Works here to, BUT it added one more guide at the top of the format, horizontal one.... Not sure why. I will rather stick with the new script for PS2024. Just to be sure.

 

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 ,
Nov 17, 2025 Nov 17, 2025
  1. The longer 66 line version of Guides Copy.jsx and the longer 62 line version of Guides Paste.jsx have never worked for me
  2. The shorter 23 line version of Export Guides - Photoshop.jsx and the shorter 28 line version of Import Guides - Photoshop.jsx works great in Adobe Photoshop 2025 for macOS!
    • My only question is: Would it be possible for the Guide Colors to copy over via these scripts?
      • The copy is multiple colored guides, but the paste always defaults to Cyan.
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 ,
Nov 17, 2025 Nov 17, 2025

The scripts pre-date guide colours. I'll give it a look when I have time, however, my understanding of Action Manager code is limited.

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 ,
Nov 18, 2025 Nov 18, 2025

@j0nathan_r0gers

 

I don't know if it's possible, or how to get the property of the guide colour.

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
Advisor ,
Nov 18, 2025 Nov 18, 2025
LATEST

Color is not a guide property that is supported in the DOM. You can use reflection to find properties. Run this script snippet with an open document containing at least one guide.

 

 

var doc = app.activeDocument;
var g = doc.guides;
var prop = g[0].reflect.properties;
var met = g[0].reflect.methods;
Window.alert(prop);
Window.alert(met);

 

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