Copy link to clipboard
Copied
Hi,
I just started with scripting and was able to build a panel that uses a .jsx to evaluate shapes and returns the results to the HTML. But for each result I would have to use a button in the HTML to fire the .jsx-function.
<a href="#" onClick="update()" id="refresh"><img src="../img/RefreshDark.svg"></a>
So update() fires a function in ExtendedScript via csInterface.evalScript(). So far so good, everything works as expected.
What I need now is firing this function in JSX whenever I select or deselect an object (path/group/compound). The eventListeners I found so far are not capable of tracking selections as far as I understand. Is there a way to imitate such a behavior as for example the info panel? Whenever I select an object it instantly updates position and size of said object. How can this be achieved for my own panel without having to click a button/link?
Thank you in advance, especially for all the old threads and tutorials you guys created on several personal sites.
you might be able to add more events, try to find AIHostAdapter plugin
here are some helpful links
Re: afterSelectionChanged & afterSelectionAttributeChanged events in Illustrator
Copy link to clipboard
Copied
you might be able to add more events, try to find AIHostAdapter plugin
here are some helpful links
Re: afterSelectionChanged & afterSelectionAttributeChanged events in Illustrator
Copy link to clipboard
Copied
Thank you Carlos for your input. I already read all of those topics multiple times but I was hoping to get around using any plug-ins. I now used the AiHostAdapter and it works like a charm, so I now need to figure out how to create a hybrid extension that deploys the plug-in along with the panel.
Copy link to clipboard
Copied
This thread moved from Illustrator Scripting to Extensions / Add-ons Development and...
You can reference events in Illustrator CC SDK->Marked Object sample plugin project.
Check below page...
Adobe Illustrator CC SDK for plugins and extensions | Adobe I/O
Copy link to clipboard
Copied
Ten, thank you for the info and link. I briefly checked it before and now I took a closer look. Unfortunately this is too complicated for me right now. I just filled my head with all the new "make a panel" information and the SDK way seems to be too steep of a learning curve for me right now. Maybe I'll tackle this one with the next extension but for now I am happy the AiHostAdapter got me to where the extension needed to be.
Copy link to clipboard
Copied
Some more links!
GitHub - Adobe-CEP/Getting-Started-guides: Getting Started guides and samples for CEP extensions
Enjoy.
Take into account that the plugin might already exist in the users plugins folder from another extension.
If you could post how you deal with the hybrid it could be useful.
Thanks
Copy link to clipboard
Copied
Yes there is, i using
Find more inspiration, events, and resources on the new Adobe Community
Explore Now