Copy link to clipboard
Copied
Hi all,
I am trying to create my first Illustrator Script and it seems that I need some help.
When selecting and copying two objects (like in the image above) and pasting them into a text editor, the following SVG code will be pasted:
(The path is shortened)
The script that I am trying to create should help me manipulating the SVG code so that only the text inside the quotes of d="" will be pasted.
The result should look like this:
Does anyone have an idea how to solve this?
Thanks a lot!
Copy link to clipboard
Copied
Could probably something as simple as a regex.match("d=\""*"\"") applied before copying to the clipboard as a filter. Just a suggestion and you need to look it up. I'm not that fluent at regex and of course if there are multiple objects/ multiple lines of code you would need to expand it further.
Mylenium
Copy link to clipboard
Copied
Thank you for the tip.
But do you have an idea how I can read the content of my clipboard?