Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

[CS3:Mac]Script Runner question...

New Here ,
Aug 14, 2008 Aug 14, 2008
Hi,<br /><br />I'm trying to perform a simple test to run a javascript file in my plugin.<br />My first question is do I need to setup/register/add something in plugin to be able to run a script in plugin? the reason I ask this, i get an error in line:<br />InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID()); <br />scriptRunner is always NULL.<br /><br />Does anyone know what is wrong here?<br /><br />this is my code snippet:<br /><br /> PMString jsFullPath("Volumes/HD1/.../MyJavaScript.jsx"); // a path to my java script file <br /> do {<br /> const IDFile outFile(jsFullPath); <br /> InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss)); <br /> ASSERT( scriptManager ) ;<br /> if(scriptManager == NULL) {<br /> break;<br /> }<br /> InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID()); <br /> ASSERT( scriptRunner ) ;<br /> if(scriptRunner == NULL) { // ******* Always returns NULL *****************//<br /> break;<br /> }<br /> ...<br /> ...<br /> ... //set other params here<br /><br /> ErrorCode err = scriptRunner->RunFile(outFile, param,..); <br /> <br /> }while(kFalse);<br /><br />Thanks,<br />Mor
TOPICS
SDK
460
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Aug 14, 2008 Aug 14, 2008
I don't understand. Your code looks very similar to mine and mine works. Could it be a compile/deployment issue?

Ian
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 14, 2008 Aug 14, 2008
LATEST
I'm testing this code with different version of CSx, The code works fine on CS3 version but fails( in a line that I marked) in other version .
Never mind should be OK on CS3.

Thanks,
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines