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
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.