Scripting Photoshop.. Guide’s

K
Posted By
Kenneth
Nov 12, 2003
Views
1065
Replies
0
Status
Closed
Hello,

I have been trying to extract guide’s from photoshop files without any luck. Creating guides with scripting is not a problem, for instance creating a vertical guide at position 142 the code below would do the trick (c#), but how can I loop through all guides in a file (and get their positions)!? I have ‘installed’ the ScriptListener plugin but it does not log movements of guides so I cant see the code how photoshop ‘grabs’ existing guides. Can anyone help me out with this?

ActionDescriptorClass desc = new ActionDescriptorClass(); ActionDescriptorClass desc4 = new ActionDescriptorClass();

desc.PutUnitDouble(appRef.CharIDToTypeID("Pstn"), appRef.CharIDToTypeID("#Rlt"), 142);
desc.PutEnumerated(appRef.CharIDToTypeID("Ornt"), appRef.CharIDToTypeID("Ornt"), appRef.CharIDToTypeID("Vrtc")); desc4.PutObject(appRef.CharIDToTypeID("Nw "), appRef.CharIDToTypeID("Gd "), desc);
appRef.ExecuteAction(appRef.CharIDToTypeID("Mk "), desc4, 3);

Adobe seems to be very moderate with information about this. It would be very interresting to know how Photoshop stores guides in the fileformat aswell, since there seems to be no information at all about this…

Any help would be very appreciated..

Regards
Kenneth

Must-have mockup pack for every graphic designer 🔥🔥🔥

Easy-to-use drag-n-drop Photoshop scene creator with more than 2800 items.

Related Discussion Topics

Nice and short text about related topics in discussion sections