How to Call JavaScript using SDK [CS4] - Reg.

Dear All,
Here I am successfully run the javascript usig SDK [CS3] coding. But I have some slight modificate then this is not working. Please kindly help me.
I'm using the SDK Code is :
CS3:virtual ErrorCode RunFile(const IDFile& idFile, bool16 showErrorAlert = kTrue,
bool16 invokeDebugger = kFalse) = 0;
Call to RunFile:
ErrorCode err = scriptRunner->RunFile(scriptFile, kFalse, kTrue);CS4:virtual ErrorCode RunFile(const IDFile& idFile, const RunScriptParams& params) = 0;
Call to RunFile:
RunScriptParams params( scriptRunner);
params.SetInvokeDebugger(kTrue);
ErrorCode err = scriptRunner->RunFile(scriptFile, params);
In CS3:
PMString jsFullPath("C:\\WINDOWS\\MacID\\BIN\\sample.jsx"); // a path to my java script file
 do {  
const IDFile outFile(jsFullPath); InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
if(scriptManager) {
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
ErrorCode err = scriptRunner->RunFile(outFile, kTrue, kFalse); 
}while(kFalse);
This above coding is working fine... in Adobe InDesign CS3.
But I have to change the code as per the CS4 SDK, but this is not working. See the below code:
PMString jsFullPath("C:\\WINDOWS\\MacID\\BIN\\sample.jsx"); // a path to my java script file
 do {  
const IDFile outFile(jsFullPath); InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
if(scriptManager) {
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
RunScriptParams params( scriptRunner);
params.SetInvokeDebugger(kTrue);
ErrorCode err = scriptRunner->RunFile(outFile, params);
}while(kFalse);
I having the doubt above the below line:
RunScriptParams params( scriptRunner);
params.SetInvokeDebugger(kTrue);
ErrorCode err = scriptRunner->RunFile(outFile, params);
I used the above line code in CS4 SDK, and run the CS4 Application then Immediatly CS4 Application is quited.
Because of the code is throwing "R6025 - pure Virutual Function call"... like that.
Here I have attached the 3 Error JPG files.
Please kindly any one can help me!, B'coz of I'm struggle to get the answer.
Anybody can give me the answer then I will appriciate!!
Thanks & Regards
T.R.Harihara SudhaN

Dear Dirk
  Many thanks for quick reply.
But Still I am not getting the answer, So please give me the correct coding;
PMString jsFullPath("C:\\WINDOWS\\MacID\\BIN\\sample.jsx"); // a path to my java script file
do {  
const IDFile outFile(jsFullPath);
if(scriptManager)
InterfacePtr<IScriptRunner>scriptRunner(scriptManager,UseDefaultIID());
RunScriptParams params( scriptRunner);
params.SetInvokeDebugger(kTrue);
ErrorCode err = scriptRunner->RunFile(outFile, params);
InterfacePtr<IScriptManager> scriptManager(Utils<IScriptUtils>()->QueryScriptManager(kJavaScriptMgrBoss));
ASSERT( scriptManager ) ;
InterfacePtr<IScriptRunner> scriptRunner(scriptManager,UseDefaultIID());
ASSERT( scriptRunner ) ;
}while(kFalse);
This old coding only, So please Modify my coding and send me.... please I need your help!!!
Thanks & Regards
T.R.Harihara SudhaN

Similar Messages

  • How to call javascript using applescript in InDesign cs2 Mac

    Hi,
    I need to integrate javascript with my apple script??? how to use it???please help me...i need it immediately..........

    Hi Andrew,
    Here is an example for you – a snippet from my script:
    global myBridgeLabel
    -- function that runs on clicking the button in adobe script studio project
    on clicked theObject
    if name of theObject is "b1" then
    set processName to "Started working"
    set myBridgeLabel to "Red"
    set myLabel to 1
    else if name of theObject is "b2" then
    set processName to "Started doing this"
    set myBridgeLabel to "Green"
    set myLabel to 2
    else if name of theObject is "b3" then
    set processName to "Started doing that"
    set myBridgeLabel to "Yellow"
    set myLabel to 3
    else if name of theObject is "b4" then
    set processName to "Finished doing this"
    set myBridgeLabel to "Blue"
    set myLabel to 4
    else if name of theObject is "b5" then
    set processName to "Finished doing that"
    set myBridgeLabel to "Purple"
    set myLabel to 5
    end if
    tell application "Adobe InDesign CS2"
    set mydocument to active document
    set myDocumentPath to full name of mydocument
    set workerName to "Kasyan"
    tell metadata preferences of mydocument
    set theDate to current date
    set myWeekday to weekday of theDate as string
    set myDenNedeli to my convertWeekday(myWeekday)
    set myRecord to (processName & " – " & workerName & " – ") & myDenNedeli & " " & text 1 thru -4 of time string of theDate & " \r"
    set myHistory to get property namespace "http://ns.adobe.com/photoshop/1.0/" path "History"
    set property namespace "http://ns.adobe.com/photoshop/1.0/" path "History" value myHistory & myRecord
    end tell
    set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate(); var bt = new BridgeTalk; bt.target = \"bridge\"; myScript = 'app.displayDialogs = \"none\"; var t = new Thumbnail (File (\"" & myDocumentPath & "\")); var mdata = t.metadata; mdata.namespace = \"http://ns.adobe.com/xap/1.0/\"; mdata.Label = \"' + myLabel + '\";'; bt.body = myScript; bt.send();"
    do script myJavaScript language javascript
    In this javascript I use pares of single and double quotes.
    The main java script – myJavaScript – (inside double quotes) contains another java script – myScript – (inside single quotes) which runs in Bridge via BridgeTalk.
    I also put variables from AppleScript into JavaScript by using two pares of double quotes – the outside pare I escape with slashes:
    set myBridgeLabel to "Red" -- a variable I defined in AppleScript
    set myJavaScript to "var myLabel =\"" & myBridgeLabel & "\"; app.activate();
    -- the contents of myBridgeLabel variable now becomes part of the JavaScript
    Kasyan

  • Please tell me how to call javascript(.js) in my vb exe for adobe illustrator cs.

    Could you please please give some sample codings "how to call javascript in my vb exe for adobe illustrator cs". I called through doscript in my vb program, but some time it throws an error. If i run the script directly in illustrator it does not throws error. So Please advice me how to solve this problem.
    Thanks in advance,
    Prabudass E

    I'm not sure if this helps but it's from the CS4 scripting examples:
    Set appRef = CreateObject("Illustrator.Application")
    Set fileSystemObject = CreateObject("Scripting.FileSystemObject")
    ' Creating a folder browser in VBScript can be a problem (relying on either Windows API calls
    ' or use of ActiveX controls which may not be present on a given system). Instead, use
    ' Illustrator's built-in JavaScript to display a file browser. DoJavaScript can return a value,
    ' in this example it's the platform specific full path to the chosen template file.
    doJavaScript = "var templateFile = File.openDialog(""Select CalendarTemplate.ai file:""); if (templateFile) filePath = templateFile.fsName;"
    myFilePath = appRef.DoJavaScript(doJavaScript)

  • How to call javascript function with dynamic data in display tag

    Hi,
    Iam new to pagination concept. Iam using display tag to display rows in jsp by strtus.
    I have a problem when calling the javascript function using ahref in attribute in display tag.
    <bean:define name="form1" property="EditDetails.List" id="ListDisplay"/>
    <display:table name="pageScope.ListDisplay" cellpadding="0" cellspacing="1" pagesize="10" partialList="false" size="listSize" requestURI="">
    <display:column property="poNo" href='javascript:searchEditDetails("./submitOrder.do? actionID=getMISLoadEdit&poNumberSel=<%=((com.po.bean.EditDetails)poListDisplay).getNo()%>&statusIdSelected=<%=((com.po.bean.EditDetails)ListDisplay).getStatusId()%>")'
    title="Number"/>                         
    <display:column property="strDate"title="Date" />
    <display:column property="orderValue"title="Order Value(INR)"/>
    <display:column property="stringRequestedDeliveryDate"title="Suggested Delivery Date"/>
    <display:column property="statusDescription" title="Status" />
    </display:table>
    The above code display the data in row format is working fine when I click the No It thow javascript error and its not redirecting to the other page.
    When I try this with ordinary struts its working fine the code is:
    <logic:iterate id="polist" name="Form1" property="EditDetails.List" indexId="i" type="com.bean.EditDetails">
    <tr>
    <td ><a href="javascript:searchEditDetails("./submitOrder.do?actionID=getMISLoadEdit&NumberSel=<%=((com.bean.EditDetails)polist).getNo()%>&statusIdSelected=<%=((com.bean.EditDetails)polist).getStatusId()%>")"><html:hidden name="polist" property="No" write="true" /></a>     </td>
    <td><html:hidden name="polist" property="strDate" write="true" /></td>
    <td><html:hidden name="polist" property="orderValue" write="true" /></td>
    <td><html:hidden name="polist" property="stringRequestedDeliveryDate" write="true" />     </td>
    <td><html:hidden name="polist" property="statusDescription" write="true" /></td>
    </tr>
    </logic:iterate>
    Please help me how to call javascript with dynamic data.
    Thanks in advance

    The ADF Mobile Container Utilities API may be used from JavaScript or Java.
    Application Container APIs - 11g Release 2 (11.1.2.4.0)

  • How to call javascript function from PL/SQL procedure

    Can anybody advice me how to call javascript function from PL/SQL procedure in APEX?

    Hi,
    I have a requirement to call Javascript function inside a After Submit Process.
    clear requirement below:
    1. User selects set of check boxes [ say user want to save 10 files and ticks 10 checkboxes]
    2. user clicks on "save files" button
    3. Inside a After submit process, in a loop, i want to call a javascript function for each of the file user want to save with the filename as a parameter.
    Hope this clarify U.
    Krishna.

  • How to call serlvet using ftp protocal

    Hai,
    How to call servlet using ftp protocal . if any one having please send that program . because generic servlet will receive any protocal request .

    The basics are to have your Server listen to port 21.
    You would then have to parse the request information to determine what is being asked for and generate an appropriate response.

  • How to call javascript function?

    Hi,
    How to call javascript function for SAP button
    control onclick event?
    Thanks in advance.

    Hi Sundar,
      u can call java script  in design mode.
      Add this code in ur design part inside body and call the function as
    <sap:button id="a" onSelect="javascript:go();"
    Add inside body:
      <script language="javascript>
    function go(){
    alert("hai");
      </script>
    Regards,
    Vinoth.M

  • [Win Ill 10] How to Call Javscript using Plugin code?

    Hi All,
    IDE:Microsoft VC++ 6.0
    Illustrator :Version 10
    I want to call a javascript from Vc++ code using SDK .I found a sample code to do this in "ASScripting.h" header.
    Here is the code:
    How to use the Scripting suite:
    /*To execute a JavaScript script inside a host application, you must acquire
    and use a JavaScript engine instance.
    A typical use of the engine:*/
    ASJavaScriptEngineRef jsEngineRef = NULL;
    ASAPI err = kSpNoError;
    err = sScriptingSuite->CreateJavaScriptEngine( &jsEngineRef );
    if ( err == kSPNoError )
    const char scriptText[] = "documents.add();" // Script to create a new document
    const char * result = NULL;
    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;
    But this does not work!I think the "CreateJavascriptEngine" method fails to work.Pls advice on this.Any help is highly appreciated.
    Regards
    myRiaz

    Ah, Illustrator 10? I'm afraid I can't help you then, there isn't an ASScripting.h header anymore, at least not in the CS3 SDK (nor in the CS2 SDK I believe).
    If you're trying to use it in AI10 or CS it should still work I think. Beyond that, I have no idea. I'm not sure what the replacement is supposed to be.

  • How to call javascript function in Flash

    Please help...
    I have a site that run multiple of domain for example
    Domain (A): raymond.com
    Domain (B): raymond.ca
    The problem is this.. when (B) html page load the flash file
    that locate at (A) it load but non of the buttons work which call
    javascript function using getURL("javascript:showpopup()"); But it
    work fine if all reside on the same domain,eg( (A) html page load
    flash file form (A)). Anyone know how to solve this other than
    create a set of flash files on (B).
    Regards,
    Raymond

    http://livedocs.adobe.com/flash/mx2004/main_7_2/wwhelp/wwhimpl/common/html/wwhelp.htm?cont ext=Flash_MX_2004&file=00001750.html

  • How to call javascript file in windows?

    I developed javascript for automated pdf files. But i don't know how to call that javascript file from outside of acrobat. Kindly advice me the various way to use that script. This is for acrobat 8.0.

    You can place Acrobat JavaScripts in various form elements, document actions, documents, and the application folder or user application folder. See the Acrobat JavaScript API Reference and Guide fo rmore information, http://www.adobe.com/devnet/acrobat/javascript.html .
    From within Acrobat's JavaScript's debugging console, one can use the following code to locate the JavaScript folders used by Acrobat/Reader:
    function JSInfo() {
    /* define function to report JS information */
    // some basic system information
    console.println(app.viewerType + ' ' + app.viewerVersion + ' is running on ' + app.platform);
    // user level script folder
    try {
    var userJS = 'User level JS folder: ' + app.getPath("user","javascript");
    } catch(e) {
    var userJS = "User has not defined use JS folder level scripts";
    console.println(userJS);
    // application level script folder
    try {
    var appJS = 'Application level JS folder: ' + app.getPath("app","javascript");
    } catch(e) {
    var appJS = "There are no defined application level JS folder level scripts";
    console.println(appJS);
    return;
    } // end of JSInfo function
    JSInfo(); // call the function

  • How to call javascript function in back bean of jsf

    hi,
    i am trying to call java script function in back bean but not done. Is there any code for call javascript function in bean file.

    Java runs at server side.
    JSF produces HTML output.
    Server sends HTML output to client.
    Java stops running.
    HTML runs at client side.
    JS starts to run in HTML.
    Clear? Java is a server side language. JS is a client side language. To run JS using JSF, simply print it out to the HTML so that it get invoked when the HTML runs.

  • How to call webservice using jdev9i

    Hi gurus and experts,
    i need to consume a webservice using oaf. with great effort finally i created stub using axis s/w.
    now i dont know how to use the stub in jdev.where to write the code and what to write.iam strucked :-( .
    since there were no sample tutorial about how to call webservice from jdev9i, iam struggling to make.iam jus a starter.
    and while googling i came to know that stubs can be created using jdev9i .but when i see new-->webservices--web service stub it is greyed out.
    i have 2 questions now:
    1)if stub created using axis can it be used in jdev9i? if yes ,please tell me how? any tutorial links also helps me.
    2)if the stubs should be created only by jdev9i so that webservices can be called using jdev,then please guide me how to make it.
    i need some helping hands from u guys.
    Thanks a lot
    Edited by: 881533 on Oct 25, 2011 2:34 AM
    Edited by: 881533 on Oct 25, 2011 2:37 AM

    Hello sir,
    i got following reply:
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Error_request</returnResult>
    </returnRecordResponse>
    but correct response is
    <returnRecordResponse  xmlns="http://xyz" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <returnResult>Success</returnResult>
    </returnRecordResponse>
    can you tell me correction in the code which i have put on the forum?or tell me other way to call webservice?

  • How to create Invoice using SDK?

    Hi Friends,
    I m creating invoice using SDK functions..
              Company comp           =     new Company();
           comp.Server           =     "CSNSYS026";
           comp.CompanyDB      =     "SBODemo_US";
           comp.UserName      =     "manager";
           comp.Password      =     "manager";
               comp.Connect();
         comp.XmlExportType  =     SAPbobsCOM.BoXmlExportTypes.xet_NodesAsProperties;
         SAPbobsCOM.SBObob oSBObob     =     (SBObob)comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge);
         Documents inv          =     (Documents)comp.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oInvoices);
         inv.ManualNumber     =     "20000";
         inv.DocDate          =     DateTime.Now;
         inv.DocDueDate          =     DateTime.Now;
            inv.CardCode          =     "C40001";
         inv.CardName          =     "EarthshakerCorp.";
         inv.DocCurrency          =     "USD";
         inv.Lines.ItemCode     =     "A00001";
         inv.Lines.Quantity     =     10;
         inv.Lines.Price          =     100;
         inv.DocTotal          =     1000;
         int i                    =     inv.Add();
         MessageBox.Show("Invoice created "+i);
    <b>While i execute the above c# code,Invoice din't created,Wht's missing in the above code</b>..
    Thanks in Advance
    regards
    Sooriyakala.P

    Ho Sooriya,
    what is the returncode from inv.add?
    If you call comp.getLastErrorDescription, you get the errordescription
    you should also set handwritten to true
    Regards
    Ad

  • How to Call Webservicer using Visuval composure Ce 7.1 server

    Hi ,
    We are created in ABAP , they r exposed in WSDL , if i have to call That web services using visuval composure please ASAP can u send , how to call WSDL In CE 7.1 Serve
    Thnks & Regards,
    Suresh

    Hi
    you can try this links:
    http://help.sap.com/saphelp_nwce10/helpdata/en/9f/9985f72084483cb316a3c2322fb090/content.htm
    (here look for the therm Creating Web Service Physical Destinations that points to :
    http://help.sap.com/saphelp_nwce10/helpdata/en/45/635dd614d73bdbe10000000a1553f7/content.htm
    best regards,
    v s
    Edited by: v s on Dec 4, 2008 12:22 PM

  • How to call BOMUIPrimaryPage using configurator extension

    Hi
    I am new to the configurator. I am working on the following requirement.
    From the Standard guided sales ui ( OA.jsp?page=/oracle/apps/cz/runtime/oa/webui/pages/CZMainPage) we have to call the (OA.jsp?page=/oracle/apps/cz/runtime/oa/webui/pages/BOMUIPrimaryPage) when user will click a custom button.
    I have created the custom button using configurator extension which is using the java class.
    Issue - I need to know how to call the OA.jsp?page=/oracle/apps/cz/runtime/oa/webui/pages/BOMUIPrimaryPage page from the java class.
    If any one is having sample code please pass it to me.
    Thanks in advance.
    Kausik

    The basics are to have your Server listen to port 21.
    You would then have to parse the request information to determine what is being asked for and generate an appropriate response.

Maybe you are looking for

  • My skype email is not real, and i dont remember my...

    Hi, i was trying to log-in to Skype, but i got error, and it says "Sorry, we didn't recognize your sign-in details. Please check your Skype Name and password, then try again." I dont remember my password. I need to get my Skype account back, because

  • I selected "ACC Encoder-iTunes Plus" for import settings to import cd's. I assumed music purchased from the iTunes Store was mp3 format.Which is it?

    I selected "AAC-iTunes Plus" as my import settings when importing CD's to my iTunes library. When I reviewed "get info" on purchased songs from iTunes, it says "Kind: Purchased AAC audio file". All of the purchased songs in my library say this. I ass

  • Premiere Pro CC

    Hello all I am getting nowere at all with Premiere Pro from the Creative Cloud. I beleive all the issues that come up for me are activation issues. so I would like to clear up how this is all done. First as I start up Premiere Pro I get a "validating

  • Universe 连接受BW cube 出错( 但QUERY可以连)

    HI Friend,     下午好,请教一个Universe 连接BW CUBE 出错问题: DBD:出现运行时异常.(获取目录$INFOCUBE的多维数据集列时出错:未知错误), 但是连 BW QUERY却没有问题, 前几天都好好的,请教各位,这个是什么问题,如何解决呢?    谢谢. Edited by: flying on Jan 28, 2010 8:15 AM

  • Partitioning an Existing Table with data

    Hi All, I am few tables with data, I need to Partition the table without affecting existing table values is it possible?. if yes then Please suggest me some ideas to archive that.. Thanks & Regards Sami