Skip to main content
December 2, 2014
Answered

how to call function in the plugin from javascript?

  • December 2, 2014
  • 1 reply
  • 980 views

Hi,

I have some function inside my plugin which i want to call from javascript. Is it possible? Sorry, im new to plugin programming.

For example, i have plugin with function func() which i want to call from external javascript. In what way i will be able to achieve this?

Thanks.

This topic has been closed for replies.
Correct answer Tom Ruark

Yes, most of the SDK examples respond to scripting parameters passed in, I would look at the Dissolve filter example. You could run your function and return parameters back to the script via the actions system if you wanted. You will get a history state doing it this way.

1 reply

Tom Ruark
Inspiring
December 2, 2014

There is a PDF called JavaScript Tools Guide CC. Chapter 7, Integrating External Libraries, is the chapter you are looking for.

You can get to the PDF via the ExtendScript ToolKit by using Help -> JavaScript Tools Guide CC.

December 3, 2014

Thank you sir for the help.

Is it possible to assign ID to function and specifying that ID during executeAction call in script?

Like at the time of executeaction call we will specify pluginID and functionID as parameter so that function will execute from the respective plugin. Is it possible ?

Thanks.

Tom Ruark
Tom RuarkCorrect answer
Inspiring
December 3, 2014

Yes, most of the SDK examples respond to scripting parameters passed in, I would look at the Dissolve filter example. You could run your function and return parameters back to the script via the actions system if you wanted. You will get a history state doing it this way.