How do you reference top level layers in scripting?
Hello, community.
For a while now, I've been using ChatGPT to help me do something I wasn't able before - write the Illustrator scripts I need to improve the efficiency of my workflows. That being said, I always run across one problem that I wasn't able to fix with my limited coding knowledge.
I cannot figure out how to reference top-level layers in illustrator. For example, I've been trying to create a script that renames all selected layers, based on a user's input string. However, when I run the script, it doesn't actually rename the selected layers, but the first item that is held within each of those layers. It's driving me crazy.
Looking forward to hearing your thoughts on this. Thank you very much for your time!
