0 Replies Latest reply on Jun 26, 2009 2:55 AM by apruneda

    Passing parameters from plugin to script

    apruneda Level 1

      I need to pass some parameters from a plugin to a script. I have tried this method:


          PMString engineName("myengine");
          PMString scriptString("C:/Program Files/Adobe/Adobe InDesign CS4 Debug/Scripts/IterateFolder.jsx");
          IDFile scriptFile;
          scriptFile.SetString(scriptString);

          PMString value("c:/windows");
          ScriptData param1;
          param1.SetPMString(valor);

          ScriptIDValuePair argument1(0, param1);
             
          ScriptRecordData arguments;
          arguments.push_back(argument1);
          ScriptData result;
          PMString errorString;
          ScriptData scriptFileData(scriptFile);
          int32 errorCode=Utils<IExtendScriptUtils>()->RunScriptInEngine( engineName, scriptFileData, arguments, result, errorString);

      The problem is that I don´t really kwno how can I get the parameter in my script. I suppose it must be something like app.scriptArgs.getValue(), but i don´t really know.

       

      Thanks,

       

      Alvaro