[JS CS4/CS5/CS5.5] How to get the return value from Javascript using doScript

Hi all

I'm calling javascript from COM (c#) and it works fine. Passing parameters to javascript and playback by using the syntax of the [x] arguments also works very well.

What I can't seem to get to work is to know how to move something from javascript to the calling COM Summoner, in this case, c#. How and where should I place the return value in javascript?

Thanks in advance.

Rachiud

doScript() evaluates an expression, so just make sure that your Javascript is an expression.

For instance "(3 + 3)" 6 "

Tags: InDesign

Similar Questions

  • How to get the return value from Java runtime.getRuntime.exec?

    I am running shell from a (GR 11, 2) Oracle database commands on aix.
    But, I would get a return value of a shell comand... as you get with "echo $?"

    I use a code like
    CREATE OR REPLACE JAVA SOURCE NAMED common."Host" AS
    import java.io.*;
    public class Host {
      public static int executeCommand(String command) {
        int retval=0;
        try {
            String[] finalCommand;
            finalCommand = new String[3];
            finalCommand[0] = "/bin/sh";
            finalCommand[1] = "-c";
            finalCommand[2] = command;
    
          final Process pr = Runtime.getRuntime().exec(finalCommand);
          pr.waitFor();
    }
       catch (Exception ex) {
          System.out.println(ex.getLocalizedMessage());
          retval=-1;
        }
        return retval;
    };
    /
    but I do not get a return value... because I don't know how to get the return value...

    Published by: user9158455 on 22-Sep-2010 07:33

    Hello

    Your pr.exitValue () has tried?

    I think you also need a finally block that destroys the sub-process

    Concerning
    Peter

  • How to get the selected values from the shuttle

    Hello

    Please tell me how to get the values of the option chosen by the shuttle leading the list.

    Thank you

    Check out this link and that this might help you.

    Attack-shuttle leak problem

    Thank you
    -Anil
    http://oracleanil.blogspot.com/

  • How to get the return value of the method by calling the stored procedure in ApplModuleImpl

    Hello

    I use Jdev 10.1.3.4
    JSF, and ADF business components
    I created a service method in the implementing class of module request to execute the strored procedure in the database.
    This breeding returns a string value.
    now, I slipped the method of service of data control palette on my JSF page and chose ADF parameter form when I droped.
    It works very well.
    now, I want to display the string returned by the method of service after the execution on the JSF page as global messages.
    How can I achieve this.
    Help, please

    Thanks in advance

    Kind regards
    Ajit Agarwal

    Hello

    You must run programmatically run the method binding. If I'm not wrong then the following code will allow you to access the return value

    OperationBinding oper = bindings.get("MyPLSQLAccessMethodBinding") (OperationBinding);
    String returnValue = oper.execute ((String));

    Once you have the string in a managed bean you can add it to the stack of messages JSF exposed by the FacesContext

    Frank

  • How to get the return value of the activity of the method in the stubborn workflow

    Hi all

    I use Jdeveloper 11 g R2 (11.1.2.3) & Weblogic 10.3.5.0

    I have a stubborn workflow, default activity is a call method than calling a method in the app module
    This method returns an id

    I need this code in my project to do something else
    Is there a way I can access the return value of the method call activity?

    Concerning
    Mohsen

    Set the value of return as #{{pageFlowScope.myBean.returnValue} pageFlowScope.myBean.returnValue} in the method, call the property inspector and get the value in your managed bean.

    String returnParam = (String) JSFUtil.getFromPageFlow ("returnValue");

  • How to get the return value of INSERT... RETURN clause?

    Hello

    With the help of the WEST, how I'm supposed to retrieve the value returned by queries like:

    INSERT INTO... VALUES (...) RETURN xxx IN: res

    ?

    Thank you
    Kiril

    It works for me. Someone posted the code for him on this thread:
    BLOB vs BFILE

    I tested successfully an integer column and also return the rowid of INSERTION. Note that the call to registerOutParam is necessary - without that I just became a string vacuum back to rowid.

    I tested with 11.2 customer against 10.2 server.

  • How to get the return values by a button on the main program.

    Hello

    I have a main program that has an Authenticate button. Click to authenticate open for auth form that has the USERNAME and PASSWORD FIELDS.
    If the input fields are true then enable editing of jtable in main program...

    Basically something like this:
    main program
    Authenticate.addActionListener (new ActionListener()
    {
    public void actionPerformed (ActionEvent ae)
    {
    Au UpdateAuth = new UpdateAuth(); / / Opens the form that has the username and pass for authentication
    ua.setVisible (true);

    need code for activation of table here
    if(s=="mactus")
    {
    enable editing of the table
    }
    table.repaint ();
    }

    });


    form opened for auth... (class UpdateAuth)

    private String SigninMouseClicked (java.awt.event.MouseEvent evt) {}
    String aname = Aname.getText ();
    String apass = Apassword.getText ();
    If (aname. Equals("") & & apass.equals(""))
    {
    JOptionPane.showMessageDialog (null, "enter the login name or password", "Error", JOptionPane.ERROR_MESSAGE);
    }
    If (!) (Aname.Equals("")) & & apass.equals("")))
    {
    If (aname. Equals("harshil") & & apass.equals ("harshil123"))
    {
    String s = "mactus"; If the user name and password is success enable editing in table in the main program
    return s;

    }
    else if (! aname.equals ("mactus") & &! apass.equals ("mactus123"))
    {
    Aname.setText("");
    Apassword.setText("");
    }
    }
    Returns a null value.
    }

    String.Equals (String)

    String.equalsIgnoreCase (String)

  • How to get the return value in sqlplus to index?

    Hello

    I am a PL/SQL Developer, and I have a problem with an existing batch.

    Here's the situation:
    I have a lot of unix, calling a first script sql with sqlplus (call script0.sql )
    script0. SQL call other scripts sql with the command @ (script1.sql, script2.sql,... = > scriptx.sql )
    My version of sqlplus is 9.2.

    ScriptX.SQL modifies the data in table with insert or update and not commit or rollback anything (it is in charge of script0.sql ).
    If there is an error produced in a clue all changes must be rollbacked.
    Unfortunately when something fails, it returns only to script0.sql without any information on his breaks down, so continuous script0.sql and when he arrivals all changes are committed because the State of script0.sql is successful when the exit is made.

    Is there an equivalent of the $? UNIX in sqlplus to obtain the return of a status @scriptx.sql?

    -----
    Here is the general syntax of the script0.sql :

    WHENEVER SQLERROR EXIT 99;
    WHENEVER OSERROR EXIT 98;

    @script1.sql
    @script2.sql

    "exit";
    -----

    Here's a simple scriptx.sql file:

    Insert into table values (x) (y);

    -----

    Published by: user10713865 on October 30, 2009 06:51

    Hello

    You can use 'Whenever SQLERROR WHAT' options to build the logic.
    Use: 'every time THAT SQLERROR EXIT DISMANTLING', if you want to there are a whole script error
    OR "WHEN SQLERROR CONTINUE ROLLBACK", if you want to restore and continue to the next.
    You might explore other options 'whenever SQLERROR WHAT' to suit your logic and add "COMMIT / ROLLBACK" to not relevant.

    See sample tests below:

    SQL> create table t1 (col1 number primary key);
    Table created.
    

    * 1. In script1 case fails, then restore and exit *.

    kallo:f632736> cat 1.sql
    WHENEVER SQLERROR EXIT ROLLBACK
    insert into t1 values(1);
    insert into t1 values(1);
    kallo:f632736> cat 2.sql
    insert into t1 values(2);
    kallo:f632736> cat main.sql
    @1
    @2
    
    SQL> @main
    
    1 row created.
    
    insert into t1 values(1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    
    SQL> select * from t1;
    
    no rows selected
    

    * 2. When script1 fails, then restore and continue to script2 *.

    kallo:f632736> cat 1.sql
    WHENEVER SQLERROR CONTINUE ROLLBACK
    insert into t1 values(1);
    insert into t1 values(1);
    
    SQL> @main
    
    1 row created.
    
    insert into t1 values(1)
    *
    ERROR at line 1:
    ORA-00001: unique constraint (ADMLHMGM.SYS_C0013874) violated
    
    Rollback complete.
    
    1 row created.
    
    SQL> select * from t1;
    
          COL1
    ----------
             2
    
  • DVT:pivotFilterBar - how to get the selected values of the filter

    Hi all

    I have a question: how to get the selected values from the pivot table filter bar programmatically?

    I tried to use
    pivotTable.getDataModel().getDataAccess().getValueQDR(startRow, startCol, DataAccess.QDR_WITH_PAGE);
    but to the edge of the side DATA INCORRECTESdeclarations page, it seems that it will return the cached values.

    Environment: JDev 11.1.1.3.0 without tasks.

    Thank you
    Miroslaw

    Hello

    You can retrieve the value selected in the PivotFilterBar through the PivotFilterBar model, instead of dataaccess:

    Download the template of the bar pivot filter instance
    QueryDescriptior queryDescriptor = (QueryDescriptor) pivotFilterBar.getValue ();

    retrieve a list of criterion, each of them is used to fill each lov in the pivot filter bar
    ConjunctionCriterion conjunctionCriterion = queryDescriptor.getConjunctionCriterion ();
    List criterionList = conjunctionCriterion.getCriterionList ();
    for (int i = 0; i)<_criterionList.size(); i++)="">
    AttributeCriterion = (AttributeCriterion) criterionList.get (i) criterion.

    _selected is the currently selected value
    Selected object = criterion.getValues () .get (0);

    System.out.println (_selected);
    }

    Hope that helps,
    Chadwick

  • get the return value of a method of the application module in the workflow

    Hello

    I use jdeveloper 11.1.1.7.0

    I defined a method (return type is useful java card) in the Module of the Application and add this method to the client interface.

    also I have a workflow and in this TF firstly I should execute this method and put the return value for the pageFlowScope parameter. I know that to use this method as a methodCall and set it as an activity by default, but I don't know how to get the return value before entering the jsff page and set the pageFlowScope parameter.

    Habib

    Concerning

    When you add the activity to the way to deal, there are 'Return value' property that you can set to #{pageFlowScope.yourVariable}

    Dario

  • How to get the decimal value of a string of international currency

    Hi all

    How to get the decimal values to a string of international currency.

    Finally, we get to the real problem.

    You can use location functions or write your own using string functions already mentioned...

    http://developer.BlackBerry.com/native/documentation/Cascades/device_platform/internationalization/

  • How to get the frame number current timeline using jsx?

    How to get the frame number current timeline using jsx?

    Thanks for the link!

    Clarification: I was looking for the current image on the timeline of the video. OP he mentions that he had found how to get that so I searched a bit more and found this thread: Re: can I inpoint in read/write and out-point of the clips in a group of video with scripts? They have the following functions, I have not tried yet, but it seems like it should work.

    function getCurrentFrame() {}

    try {}

    Var ref = new ActionReference();

    ref.putProperty (charIDToTypeID ('Rprp'), stringIDToTypeID ('currentFrame'));

    ref.putClass (stringIDToTypeID ('timeline'));

    var / / desc = new ActionDescriptor();

    desc.putReference (charIDToTypeID ('null'), ref);

    var TC = executeAction (charIDToTypeID ('getd'), desc, DialogModes.NO);

    Return TC.getInteger (stringIDToTypeID ('currentFrame'));

    } catch (e) {return null ;}

    };

  • How to get the RGB value of a pixel in a psd document using scripting Photoshop

    Hi, guys!    Does anyone know how to get the RGB value of a pixel in a psd document using scripts in Photoshop?  I myself have missed for a long time and could not resolve. I am very happy to hear your voice as soon as possible!

    Here is an example...

    var originalUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.PIXELS;
    var doc = activeDocument;
    var Colour1 = GetHexColour(eyeDropperRGB(1,doc.height-1));
    var Colour2 = GetHexColour(eyeDropperRGB(20,doc.height-5));
    var Colour3 = GetHexColour(eyeDropperRGB(40,doc.height-14));
    alert("Colour 1 = " +Colour1 + "\rColour 2 = " +Colour2 + "\rColour 3 = " +Colour3);
    var decColour = eyeDropperRGB(40,doc.height-14);
    alert("Red = " +decColour[0] + "\rGreen = " +decColour[1] + "\rBlue = " +decColour[2]);
    app.preferences.rulerUnits = originalUnits;
    function GetHexColour(reqHex){
    var out='';
    for(No in colours = reqHex){
     out = out.concat(zeroPad(d2h(reqHex[No]),2));
     }
    return out;
    };
    function eyeDropperRGB(x,y) {
     var x2 = x + 1;
     var y2 = y + 1;
     var out = new Array(3);
     activeDocument.selection.select([[x,y], [x2,y], [x2,y2], [x, y2]], SelectionType.REPLACE, 0, false);
     for(ch in list = ["Red", "Green", "Blue"]) {
     histogram = activeDocument.channels[list[ch]].histogram;
      for (i = 0; i <= 255; i++) {
       if (histogram[i]) {
        out[ch] = i;
        break;
       }
      }
     }
      return out;
    };
    function d2h(d) {return d.toString(16);}
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    };
    
  • How to get the return in this example

    Hi all,

    In this simple example, is there an exception caused by the business logic. However, I would like to get the return value of 'p_dt' which will be stored in a table of newspaper, but when the exception occurs that the value is eliminated. How can I solve this? Thank you for your help.
    SQL> select * from v$version where rownum = 1;
    
    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    create table test as(select 1 id, to_date('01/01/2009','dd/mm/yyyy') dt from dual)
    /
    
    Create OR Replace Package Pkg_Test Is
    
       Procedure Prc_Call_Test;
    
    End Pkg_Test;
    /
    
    CREATE OR REPLACE Package Body Pkg_Test Is
    
       Procedure Prc_Test( p_id In  Pls_Integer
                         , p_dt OUT Date ) Is
       Begin
          SELECT DT
            INTO p_dt
            FROM TEST
           WHERE ID = p_id;
    
          If p_dt < Sysdate Then
             Raise_Application_Error(-20000, 'Anything');
          End if;
       End Prc_Test;
    
    
       Procedure Prc_Call_Test
       Is
          v_dt Date;
       Begin
          Prc_Test(1, v_dt);
          Dbms_Output.put_line(v_dt); -- the return is null
       End Prc_Call_Test;
    
    End Pkg_Test;
    /
    Kind regards

    If you use NOCOPY in the parameter, then the value will be applied directly to the variable of output as it get set to so it will not be lost when the exception occurs. So, of course, to capture the exception or anything to access your dbms_output statement, but it is trivial...

    SQL> ed
    Wrote file afiedt.buf
    
      1  CREATE OR REPLACE Package Body Pkg_Test Is
      2     Procedure Prc_Test( p_id In  Pls_Integer
      3                       , p_dt OUT NOCOPY Date ) Is -- Note the use of NOCOPY on the parameter
      4     Begin
      5        SELECT DT
      6          INTO p_dt
      7          FROM TEST
      8         WHERE ID = p_id;
      9        If p_dt < Sysdate Then
     10           Raise_Application_Error(-20000, 'Anything');
     11        End if;
     12     End Prc_Test;
     13     Procedure Prc_Call_Test
     14     Is
     15        v_dt Date;
     16     Begin
     17       BEGIN
     18         Prc_Test(1, v_dt);
     19       EXCEPTION
     20         WHEN OTHERS THEN -- Capture the correct error here rather than OTHERS
     21           dbms_output.put_line('Error occurred in prc_test');
     22       END;
     23       Dbms_Output.put_line(v_dt); -- the return is null
     24     End Prc_Call_Test;
     25* End Pkg_Test;
    SQL> /
    
    Package body created.
    
    SQL> exec pkg_test.prc_call_test;
    Error occurred in prc_test
    01/01/2009 00:00:00
    
    PL/SQL procedure successfully completed.
    
    SQL>
    
  • How to get the CPU usage in LabWindows using C program

    Hi all

    Please help me...

    How to get the CPU usage and the use of the RAM in LabWindows CVI 12.0 using C.

    Any help with this will be appreciated.

    Thank you in advance


Maybe you are looking for