Copy link to clipboard
Copied
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?
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));
Copy link to clipboard
Copied
Can you post the fixed old script?
Copy link to clipboard
Copied
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));
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Copy link to clipboard
Copied
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);
Find more inspiration, events, and resources on the new Adobe Community
Explore Now