Quantcast
Channel: Adobe Community : Popular Discussions - Photoshop Plugin and Companion App SDK
Viewing all articles
Browse latest Browse all 54282

Call Script through plug-in.

$
0
0

Hello,

I have written script(.jsx).I want to execute that script throught photoshop CS3 plugin(Like indesign we call script through plugin).Is it possible call script through Plugin?

if possible then how?

On the following thread

http://forums.adobe.com/message/4632125#4632125

some one said we can call script by using executeScript method in CS5.But executeScript method is not present in CS3.

So,I tryied following for CS6.

     #include "JSScriptingSuite.h"

 

     JSScriptingSuit2 sScriptingSuite;

     sScriptingSuite.CreateEngine(&engineRef);         

     if(engineRef != NULL)

     {

          char *scriptText = "documents.add();"; // script to create new doc.         

          ASUnicode script = (ASUnicode)scriptText;

          sScriptingSuite.ExecuteScript(engineRef, &script, kJSExecutionModeNoDebug, kSPNoError);

     }

 

    But, when i call CreateEngine function it crashes.Is anything wrong in above code?which library i have to add?

      please,help me.


Viewing all articles
Browse latest Browse all 54282

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>