How to call Script either java or VB in SDK???

Hi,
Im in need to call either java script or vb script from my plugin..
This can be made using either illustrator 10 SDK(VC++) or illustrator cs2 SDK..
I found ASScripting.h in illustrator 10 SDK.. But it doesn't give me output though it compile successfully.
Please some one provide me the syntax for either calling java or VB script..
The code i used for calling javascript is
ASJavaScriptEngineRef jsEngineRef = NULL;
AIErr err;
const char * result = NULL;
err = sScriptingSuite->CreateJavaScriptEngine( &jsEngineRef );
if ( err == kSPNoError )
const char scriptText[] = "documents.add();"; // Script to create a new document
err = sScriptingSuite->ExecuteJavaScript( jsEngineRef, scriptText, &result );
if ( err == kASScriptExecutionError )
// If error during execution, display a dialog containing returned error information string.
ErrorAlert( result );
err = sScriptingSuite->DeleteJavaScriptEngine( jsEngineRef );
jsEngineRef = NULL;
It compile successfully but doesn't give any output.. I gave messagebox to before and after and createjavascriptengine. the messagebox after did not get executed..
Please some one provide me a solution regarding this...
Thanks in advance...

If you do it like Greeks says then the javascript variable will be set when the page loads (userName probably blank). You will want the current value from the input field so use getElementById().
Edited by: gmachamer on Nov 21, 2007 7:23 AM
oops, just noticed Greeks posted both replies... so what I should have said is use his first suggestion as the second is not what you want.

Similar Messages

  • How to Call Livelink Archive Java Viewer(IXOS-JavaViewer Applet )

    Hi,
    I want you to teach,How to call Livelink Archive Java Viewer(IXOS-JavaViewer Applet)
    I want to call it in the following images.
    When the button is pushed, I want to call Livelink Archive Java Viewer.
    The method was not able to be taught though it inquired of the help desk of
    IXOS.
    Please teach me!
    Reagard

    Hi Tomohiro,
    Is this issue being resolved? which version of ixos server and viewer are you using?
    regards,
    Jess

  • How to call script in jsp

    How to call script in jsp
    3A-_@. Feb 8, 2007 3:08 AM
    Hi,
    I have abc.jsp file where i want to call javascript on pressing submit button.
    <input type="text" name="UserName" value="" width="30" />
    <input type="submit" value="Submit" onclick=" <what should i write here??">
    here how to call script?
    and in the same abc.jsp file i have javascript ( i am not sure about the way i m accessing text value inside javascript is right or not)
    <SCRIPT LANGUAGE="javascript" >
    here how can i access UserName field value here??
    if(isThisNotNull(UserName))
    alert("UserName Is Mandatory");
    </SCRIPT>

    If you do it like Greeks says then the javascript variable will be set when the page loads (userName probably blank). You will want the current value from the input field so use getElementById().
    Edited by: gmachamer on Nov 21, 2007 7:23 AM
    oops, just noticed Greeks posted both replies... so what I should have said is use his first suggestion as the second is not what you want.

  • How to call procedure in Java from SQL Server Database

    Hello Every Body
    i Have Question about
    How to call procedure in Java from SQL Server Database
    Thanks

    Hi,
    have you tried a Google search? I just gave it a 3 second try and already found: http://stackoverflow.com/questions/6113674/how-do-i-execute-a-ms-sql-server-stored-procedure-in-java-jsp-returning-table-d
    Frank

  • How to call XML in java?

    I am designing a application for Running Automated Tests in java.It means that i will upload a (selenium)java file and on click of Run button, i need to call Apache ant build.xml to automize the test.Because Selenium always runs with Ant.How to call build.xml from a java file.

    Symbi wrote:
    I am developing a project using java .I know selenium supports for 6 different languages(java,perl,php,python,ruby,.net).But i am asked for only selenium script in java.So i will upload only selenium java files.In Ant build.xml,we will give the filename(For ex.login.java).In front end ,i will have a run button.On clicking the Run button,I need to run the ant build.xml.So the only way is i need to call build.xml in the java file.This is my idea.If you have any other suggestion let me know how to proceed.I don't know, I don't use Selenium. But I do know that Ant isn't the only way it can be run. Ant isn't the only way anything can be run. Not even Ant. So since your assumption was that you needed to invoke Ant to do this, it's logical that you're wrong about that. There will be other ways to do it, read the docs

  • How to call codec in java code

    i want to call a jmf codec for video compression form direct capture device, i dont know how to call codecs of Jmf i am using jffmpeg how to implement it can any one please let meknow

    Lot of examples are given in the below link
    http://www.oracle.com/technology/sample_code/tech/java/jsp/oracle9ijsp.html

  • How to call another directory java program?

    Hi All,
    For Example:
    My program is here in two directories.Let Think that directory names like A and B.
    Let Program names like Aprog(A directory) and Bprog(B directory).
    I want to call Aprog to Bprog method.
    How to call?
    Plz., help me ASAP.
    --Mohan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    My program is here in two directories.Let
    Think that directory names like A and B.
    It's more complicated than that. A java program consists of multiple .class files. In general you have one or more "trees" of directories of .class files, where the structure of the tree reflects the package structure. So a the class file for "org.dingbat.Thingy" is <basedir>/org/dingbat/Thingy.class where <basedir> is some directory on the class path.
    So referencing one class from another in different directories requires that the source provides the "fully qualified name" of the class (usually on an import) and making sure that, if it's in a different class file tree, both base directories are on the class path.

  • How to call webservice using java client

    Hi,
    I am new to webservice related stuff.Can any body help me.
    How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
    Thanks
    venuj

    user10394151 wrote:
    Hi,
    I am new to webservice related stuff.Can any body help me.
    How can i call the webservice using simple java programing using jdeveloper tool is very useful for me.
    Thanks
    venujTry this simple webservice client.
    You will need apache-axis.jar in your classpath. The following client is apache axis based. A similiar client can be built also using the JAX-WS only[without apache-axis.jar].
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import javax.xml.namespace.QName;
    public class WEBSERVICE_CLIENT{
    public static void main(String [] args) {
    try {
    String endpoint ="<YOUR WS ENDPOINT>";
            Service  service = new Service();
            Call     call    = (Call) service.createCall();
            // YOU CAN SET VARIOUS PROPERTIES IN THE "CALL" OBJECT...LIKE
            // USERNAME,PASSWORD,PROPERTIES OF HTTP HEADER. SEE "CALL" OBJECT'S API FOR MORE PROPERTIES.
            call.setTargetEndpointAddress( new java.net.URL(endpoint) );
            call.setOperationName(new QName("<YOUR WS SERVICE NAMESPACE>", "<WS SERVICE TO BE INVOKED>"));
            String msg = (String) call.invoke( new Object[] { "data" } );
            System.out.println("RETURNED MESSAGE : "+msg);
          } catch (Exception e) {
            System.err.println(e.toString());
    }

  • How to call webservice from Java application

    Hi XI gurus
    Pls let me know how to call a webservice from Java application.
    I wanted to build synchronous interface from Java Application to SAP using SAP XI
    For example, i need to create Material master from Java application and the return message from SAP, should be seen in Java application
    Regards
    MD

    Hi,
    If your  JAVA Application is Web based application, you can expose it as Webservice.
    JAVA People will pick the data from Dbase using their application and will send the data to XI by using our XI Details like Message Interface and Data type structure and all.
    So we can Use SOAP Adapter or HTTP in XI..
    If you use HTTP for sending the data to XI means there is no need of Adapter also. why because HTTP sits on ABAP Stack and can directly communicate with the XI Integration Server Directly
    If you are dealing with the Webservice and SAP Applications means check this
    Walkthrough - SOAP  XI  RFC/BAPI
    REgards
    Seshagiri

  • How to call webservices function - java importer 6i -Duncan?

    I've imported methods of a webservice from salcentral following instructions in otn.
    Now I need to figure out how to call the resulting function in forms
    Here is the function, the pl/sql error is wrong number or type of arguments
    Anyone done this and know how to get the function signature correct?
    I want to call checkemail
    PACKAGE BODY MXCheckerStub IS
    -- DO NOT EDIT THIS FILE - it is machine generated!
    cls ORA_JAVA.JCLASS;
    fid ORA_JAVA.JFIELD;
    mid ORA_JAVA.JMETHOD;
    args JNI.ARGLIST;
    -- Constructor for signature ()V
    FUNCTION new RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage/MXCheckerStub');
    mid := JNI.GET_METHOD(FALSE, cls, '<init>', '()V');
    args := NULL;
    RETURN (JNI.NEW_OBJECT(cls, mid, args));
    END;
    -- Method: CheckEmail (Lorg/w3c/dom/Element;)Ljava/util/Vector;
    FUNCTION CheckEmail(
    obj ORA_JAVA.JOBJECT,
    a0 ORA_JAVA.JOBJECT) RETURN ORA_JAVA.JOBJECT IS
    BEGIN
    cls := JNI.GET_CLASS('mypackage/MXCheckerStub');
    mid := JNI.GET_METHOD(FALSE, cls, 'CheckEmail', '(Lorg/w3c/dom/Element;)Ljava/util/Vector;');
    args := JNI.CREATE_ARG_LIST(1);
    JNI.ADD_OBJECT_ARG(args, a0, JNI.GET_CLASS('org/w3c/dom/Element'));
    RETURN JNI.CALL_OBJECT_METHOD(obj, mid, args);
    END;

    I would try to take an aproach where I'll generate a stub for the WSDL in JDeveloper, and also write a
    Java class that calls this stub and return a simple variable (String, int, or boolean).
    Then I would call this class from Forms.
    I believe this would make it easier.

  • How to call xml from java

    Hi
    I want to use xml for updating files in an existing jar . so i want to call xml from java code and then come back to java code and do the remaining work in java code, pl guide me how to do this . what APIs are helpful for this regard
    Thanks

    You can't update files in a jar. Even if you could, you wouldn't use XML for that. You don't call XML. XML is not a programming language. So, basically your entire question is misguided.

  • How to call xsl from java?

    Hi All,
    My main java class 'OrderCustomerEntry' is located in package 'Order.Profiles.Customer'
    I have my xml input stored in a String object. Now I have stored a xsl in the same package 'Order.Profiles.Customer'.
    I make certain updations to my xml. After that, I have to call a xsl, which will finally do some transformations on my xml.
    Kindly tell me how to call this xsl file from java.
    Thanks,
    Sabarisri. N
    Edited by: Sabarisri N on Oct 11, 2011 11:15 AM

    This can be complicated with many factors coming into play. Suppose everything is set up in good order, if the xsl is stored in the jar containing the package Order.Profiles.Customer at its root. That means, the jar has some structure like this:
    Order/Profiles/CustomerOrderCustomerEntry.class
    META-INF/...
    xyz.xsl
    etcYou may try this when load it up.
    String xslFile="xyz.xsl";
    //tf being the factory
    Transformer transformer = tf.newTransformer(new StreamSource(ClassLoader.getSystemResourceAsStream(xslFile)));The change with respect to the case where the xslFile is in the current directory is the ClassLoader part.
    Suppose it is stored in a resource directory say "res".
    Order/Profiles/CustomerOrderCustomerEntry.class
    META-INF/...
    res/xyz.xsl
    etcThe corresponding lines would look like this.
    String xslFile="res/xyz.xsl";
    //tf being the factory
    Transformer transformer = tf.newTransformer(new StreamSource(ClassLoader.getSystemResourceAsStream(xslFile)));Hopefully, this may be enough to get you going...
    ps: Although no one should force anyone on the way to name packages, the majority in the industry uses all lowercase characters whenever possible.

  • How to call a WD JAVA application from a WD ABAP application

    Hi experts,
    Here I have two applications with me. One has been created through WebDynpro ABAP while the other one has been created through WebDynpro JAVA. Now i have to call upon the JAVA aplication from my ABAp application. In other words in need to integrate both the applications so as to have an easy navigation in between them.
    In the whole process I need to take care that the data is not lost from both ABAP or JAVA side.
    Please help me someone knows the solution.
    Regards,
    Kaustubh Maithani

    Hi,
    Usally to run WebDynpro for Java Application, we get the Application URL.
    If you want to call this WebDynpro Java Application from Webdynpro Abap, then create UI element like Link to Action or LinktoURL and give the url as WebDynpro for Java URL.
    Regards,
    Lakshmi Prasad.

  • How execute Unix script from java?

    Can I execute Unix script from java?

    Yes. Using ProcessBuilder. And read [When Runtime.exec() wont|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html]. It's old, but pretty much all of it is still true.

  • How to call javascript from java application

    How can we call a function written in javascript from java application (core java not applet)? How will java identify javascript?
    Is there any such options ?

    Try creating a page called launcher.html (for example). That does this:
    <html>
    <head>
    <script language="javascript">
    windowHandle=window.open("http://www.javasoft.com", "", "height=700,width=1000,status=no,scrollbars=yes,resizable=yes,toolbar=no,menubar=no,location=no,top=5,left=5");
    </script>
    </head>
    </html>Now you launch IE (or whatever) with this page using the Runtime class. After x seconds (after the second window has been launched) try killing the process. Hopefully it will kill the original window you opened and not the window you popup (the one without toolbars etc)
    It might kill both windows but I can't be bothered to test it. If it does you'll have to try and find a workaround.

Maybe you are looking for

  • HTML Tags escape while exporting to PDF

    Hi friends, I have two columns in my BI report like Business Group(BG) and OU Since in the BG column under the edit formula i used the html tags to show each and every BG column value in bold like below '<b>' || "D1.Company"."Business Group Full Name

  • PlayBook OS v2.0.1.668 now available

     PlayBook OS v2.0.1.668 now available from your PlayBook at Options > Software Update. The update varies for users from 315-319MB in size. It's recommended that you connect to a power source during the upgrade (so your battery doesn't go dead halfway

  • Before Update Trigger has mutating problem

    I'm getting a mutating problem with this updating trigger. I'm not sure how to deal with it. Here is my code: CREATE OR REPLACE TRIGGER WTL_SMP_TRG2 BEFORE UPDATE ON WTL_SAMPLES FOR EACH ROW DECLARE      sampleCount NUMBER(1) := 0;      dupLabSampleI

  • Auto start and shutdown 9iR2 on Mac OS X?

    Does anybody know how to set up Mac OS X to auto start and auto shutdown 9iR2 on Mac OS X?

  • Affected tables after creation of a customer

    Hi all, Can anybody tells me which tables are affected after creation of a customer in EBS R12.1.3? I wanna know where is stored party_name and tax_reference. I already know about tables: HZ_PARTIES and HZ_ORGANIZATION_PROFILES but if they are other