Skip navigation
justAnotherRandomPerson
Currently Being Moderated

Exposing C++ methods to Javascript

May 10, 2013 5:01 PM

Tags: #photoshop #javascript #c++ #scripting #sdk #plugins

Hi,

 

Just wondering if its possible to expose methods from my Photoshop C++ Plug-in to Javascript to allow them to be used in a script?

These methods are system-ish so they have input values that would change ect.

 

Cheers

 
Replies
  • Currently Being Moderated
    May 13, 2013 7:37 AM   in reply to justAnotherRandomPerson

    If your plugin properly defines parameters in its PIPL (see the SDK examples) it can be triggered from Javascript or from an action or from another plugin etc. Its not going to be as cool as extending Photoshop's DOM could have been, i.e. no app.MyPLuginMethod() style of invocation, but you can invoke your plugin by calling Photoshop.app.executeAction() with the plugin's unique ID and optionally pass some parameters in the descriptor parameter.

     

    There is an utility plugin called ScriptListener (http://www.adobe.com/devnet/photoshop/scripting.html) which you probably want to take a look at.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points