How to Access Guides or Slices via Script in Photoshop?
Hi everyone,
I'm working on a script in Photoshop that aims to automatically split a document into separate layers or images based on either guides or slices. I can manually create the guides or slices, and I can see them in the document, but when I try to access them via script, it doesn't seem to work.
Here's what I've tried:
I confirmed that guides or slices are already present in the PSD.
I attempted to loop through document properties or use ActionManager code to get guides or slices.
For guides, I'm not sure how to access their positions.
For slices, I couldn't find any scripting API that allows access at all.
My questions:
- Is it possible to read guides via script (ExtendScript or UXP)?
- Can I access slice information via script in any way?
- If not, is there a workaround to split regions based on guides?
Any advice or code snippets would be greatly appreciated!
Thanks in advance!
