Javascript from a Plug-in

Can I run javascript from a plug-in ? I'd like to change some document features when my plug-in finishes. Is this possible ? If so how ?
Thanks,
Matt

Almost every object inside an InDesign document can have a label. In JS, simply use
>[whatever].label = "Your private data";
where "whatever" is anything from Application, Asset, AssignedStory, Assignment, Behavior, Book, BookContent, Bookmark, Button, Cell, CellStyle ... and so on (about 100 items).
The string may be any string you want, of any reasonable length (I remember seeing a limit of 32,767 characters somewhere).

Similar Messages

  • Pass arguments to javascript from plug in...

    Hi,
    I m using InDesign CS3 on MAC OS...
    I have a plugin calling a javascript. I need to pass a string value from the plug in to the script...
    I found that there is a parameter in the method RunFile in IScriptRunner.h for this purpose... But i don kno how to use this...
    virtual ErrorCode    RunFile(const IDFile& idFile, IScriptEventData* data,  bool16 showErrorAlert = kTrue, bool16 invokeDebugger = kFalse) = 0;
    where,
    @param data is used to pass arguments and return the result IN/OUT
    What does this  IScriptEventData* data carry???
    How to pass a string value as argument to javascript from plugin code and how to retrieve and use it there...
    Is there any sample code for this?
    Someone pls guide me...
    Thank you.

    Are there other command line options with extendscript, like compile to jsxbin etc.. Where is this documented?
    UDevp wrote:
    I used the below command to run script from command prompt, I'm able to run the script but not able to pass arguments to the script.
       "C:\Program Files\Adobe\Adobe Utilities\ExtendScript Toolkit CS4\ExtendScript Toolkit.exe" -run "C:\Program Files\Adobe\Adobe InDesign CS4\Scripts\test.jsx"
    Any suggestion would be helpful..
    It may be possible to edit prefs file with command line and to check file in script.

  • Calling Javascript from ABAP webdynpro application

    Hai All,
    I want to call a Javascript from ABAP-Webdynpro application. If anyone has done this. Please let me know.
    Thanks & Regards,
    H.K.Hayath Basha.

    go to window
    create suspend outbound plug and resume inbound type
    when create an outbound plug of Suspend type a parameter Url is automatically created,
    fire the outbuond plug with the Url to a BSP page where you have JavaScript.
    and fromt he BSP navigate back to WDA again which you can do using by reading the url parameter sap-wd-resumeurl, which contains the WDA URL
    Abhi

  • How can I show album art in the mini player when playing songs from a plugged in iPhone?

    How can I show album art in the mini player when playing songs from a plugged in iPhone?
    When I play from my phone and switch to the mini player it's always showing the music notes in the thumbnaill. It'd be nice if it could get album art off of the phone.
    I'm on iTunes version 11.0.4.4

    He @mracole,
    it is very nice that you post a solution to complete the library with artwork for album's that do not have an artwork. Your solution perfectly addresses the problem for assigning artwork, BUT this thread is about CHANGING artwork for albums already uploaded into iTunes Match. Just try to replace for example a blue artwork cover for an album with a red one. If you made it in a simple way (without deleting the album from iTunes Match and local changes on the files with an external ID3-Application or 2 or more iTunes libraries on different Mac's) this is the right place to give a solution. I really tried for hours to change the artwork to make them visible in landscape cover flow mode on my iPhone5. In rare cases I made it, but then the covers sometimes where restored to the old onces - exacly how it is mentioned by Starhawk
    As long as there is no simple way to change the cover of an iTunes Match stored album (you can change title, artist and so on without hitting "update iTunes Match" over all distributed Library on different devices - this date will be synchronized almost instantly) I considered the behaviour from iTunes as BUGGY! For me the local artwork cache (and if there is any iCloud artwork cache - I don't know) do not interfere with iCloud. Even when I delete the whole local cache (album artwork music - everything) I do not manage to change the artwork.
    Regards from Munich, Germany

  • Yesterday I updated logic pro and my IK Multimedia ARC system has disappeared from the plug in drop down window, how can I get it back, it appears on old files but not new ones

    yesterday I updated logic pro, I have just discovered that my IK Multimedia ARC system has disappeared from the plug in drop down window, can anyone advise how I can get it back. It seems that old logic files where it was previously loaded still have the plug in live, but on a new project file it simply isn't there to select and activate.

    Not sure about your issue. What did you update from and to? Is ARC still in the plugins/components folder?
    I'm an ARC user too. I have it plugged in to Audio Hijack Pro which is set to hijack audio from Logic. This way ARC is after logic and you don't have to remember to bypass the plugin before you bounce.

  • Problem invoking Javascript from applet

    Hi,
    I have a hidden iframe in my JSP. While submitting the form within the JSP, I set the target of the response page as the iframe and disable all the form elements in the JSP . The response page contains an applet that pops up a window(a JFrame). On pressing the close button of the applet's frame, I invoke a Javascript method in the JSP. This javascript method enables all the components on the JSP.
    Now the issue is that, when I press the close button, the browser just hangs... This doesn't happen on all the browsers.. It works with Opera. In IE it doesn't work all the time. Some times IE just hangs... Any idea what the issue could be?? Pls let me know if the problem is not clear..
    Thanks in advance..
    regards,
    Anand

    Funny I've just posted something about this on another thread.
    http://forum.java.sun.com/thread.jsp?forum=54&thread=157547
    You can apparently call methods on your applets from javascript.
    http://developer.netscape.com/docs/manuals/communicator/jsguide4/livecon.htm#1007749
    I know that most of the LiveConnect package works in NS4, NS6, IE4 and IE5, but I have always called out to JavaScript from Java not the other way around so I cannot vouch for this in IE.

  • How to remove javascript from a form?

    Because some users have javascript disabled in their Acrobat readers I’d like to remove all javascript from a pdf-form I have so that the users with js disable don’t get the dialog every time opening a file. As far as I know there’s no need for javascript on the page. How do I disable or remove js from a pdf-form in Adobe Livecycle Designer ES 8.2 ? Thanks!

    Thanks Paul! I had not noticed that there was more to the script editor than met the eye (the resize thing) Here is a picture of what I found.
    I followed your instructions and deleted the lines with line numbers. Now when I saved and re-opened the document my “Events with Scripts” view is completely empty. Still when I open the document in Reader it says “This document contains JavaScripts. Do you want to enable JavaScripts from now on? The document may not behave correctly if they’re disabled”.
    Any ideas what to do? When I select “Show all events” there’s a lot of lines with (JavaScript, client) after them.. could this have something to do with it?
    - Janne

  • Webkit. How to connect external javascript from dir C:

    I can't execute javascript from dir C:
    I have some html, that I load in Webkit with loadContent(). In that html invoked function test(). Function contains in a separate javascript file.
    <head>     
    <script language='javascript' type='text/javascript' src="file:///C:/temp/test.js"></script>
    <script>
         function getText() { var val = document.getElementById('text_area').value;
              prompt('getText', "val");
    </script>          
    </head>
    <body>
           <textarea id='text_area' name='text_area' style="width:100%; height:100%"></textarea>     
           <script> test(); </script>
    </body>External javascript (test.js)
    function test() {
            alert('It works!');
         getText();           
    }External js doesn't work. PromptHandler (AlertHandler) doesn't catch anything. If I use wEngine.executeScript('test'), appear error: netscape.javascript.JSException: ReferenceError: Can't find variable: getText.
    But that code works on any other browsers.

    Thank you for the problem report!
    This looks like a bug in WebView. A Jira issue has been filed to track this: http://javafx-jira.kenai.com/browse/RT-17330. Note that the issue may end up classified as not-a-bug because the ability to run local scripts from dynamic contents may be considered a security hole.
    As a workaround, try saving your HTML into a temporary file and load it using WebEngine.load(). It should work as in any other browser. Another option is to include all necessary code in the HTML document loaded with WebEngine.loadContent(), but I gather that is undesirable in your case.
    Edited by: 890759 on Oct 11, 2011 5:19 AM
    Edited by: 890759 on Oct 11, 2011 5:21 AM

  • Calling javascript from a button

    Good morning everyone!
    I need to add a message box that asks the user a confirmation to delete information. So I want my delete button to call the javascript necessary to confirm the delete and then delete.
    My problem is in calling the javascript. I'm able to do so by using an image for my button and in the image attributes add:
    onclick="javascript:confirmDelete('Are you sure you to delete?');"
    This works perfectly, except for one thing: I don't want to use an image for the button. It doesn't fit with the rest of the application.
    I know it can work, because Oracle is using it on this page:
    http://apex.oracle.com/pls/otn/f?p=37719:8:3069181226556730::NO:::
    So how can I call my javascript from an ordinary button?

    I have a related question:
    How can I access the BROWSER_LANGUAGE in javascript? With my method of calling javascript, I didn't find a good way to pass variables to the function that I call.

  • How to identify the presence of scroll bars in browser from the plug-in

    I am developing a plug-in for the type application/x-shockwave-flash. In windowless mode, firefox window client area shared by all the plug-ins. Since plug-in runs in plugincontainer.exe, and DC is passed from firefox.exe, i couldn't the any api or the way to query the firefox for the presence of scrolling bars.
    Could you please tell me the way to identify the presence of scrolling bars in the browser from the plug-in?

    Go to DB02 --> Additional functions --> BW analysis , you will see rows (in pink) highlighted for cubes , dsos and PSA.
    For cubes click on highlighted row for cube and put filter *cube name * , it will shows all related tables with the space . Space occupied by different tables of the cube can be summed up to get total value .
    Similarly for DSO and PSAs.
    You may download this information on an excel and then put descending order on space column to get cubes occupying max space .
    Also look for table RSDODSO (directory for all DSOs) and RSDCUBE ( directory for all cubes) , i suppose you will get space information there as well.

  • 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.

  • This is an message when I open up CS4 in Illustrator.  "Some plugins in additional plugins folder are conflicting with application or user plugins.  It will skip loading plugins from additional plug-ins folder?  What does this mean and how can I fix it.

    This is an message when I open up CS4 in Illustrator.  "Some plugins in additional plugins folder are conflicting with application or user plugins.  It will skip loading plugins from additional plug-ins folder?  What does this mean and how can I fix it?

    Thanks Larry.  I thought so.  I will do this weekend.  Again, I appreciate your help.
    Trying to get updated software – I am not a fan of the cloud stuff.  Nothing I can do about it.
    Thanks again Larry!

  • How to execute the InDesign Javascript from outside in MAC

    Hi All,
    I need to execute the InDesign Javascript from outside in MAC machine.
    Anyone can help me.
    Thanks in advance.
    Regards,
    Ramkumar

    If you just want to imitate double clicking a file, use execute() method, e.g.:
    var myJavaScriptFile = new File("~/Desktop/Test.jsx");
    myJavaScriptFile.execute();
    At the top of your .jsx file type #target indesign to make the script run in InDesign.
    And I want to add to what Harbs said in the previous post: when you use do script command, you can also send parameters and get back values. See DoScriptParameters and DoScriptReturnValues sample scripts from InDesign CS3 Guide Scripts for details.

  • Question I am getting this error and see no place to change scripting?JavaScript is disabled in your browser. Please activate JavaScript from Tools Internet Options Security Internet Custom Level Scripting Active Scripting Enabled.

    JavaScript is disabled in your browser. Please activate JavaScript from Tools>Internet Options>Security>Internet>Custom Level>Scripting>Active Scripting>Enabled.
    These are the instructions for internet explorer but i can't see anything in firebox.

    In my Firefox 5.0 I see check-box for enabling/disabling JavaScript in the "Content" tab.
    Is it checked in your Firefox and JavaScript still not working?

  • Calling Javascript from JApplet

    Does anyone know of a foolproof way of calling Javascript from an Applet on a Web page. I have heard of the JS Object but can't find much aboout it. Does anyone have any ideas?

    or...
    http://turtle.ee.ncku.edu.tw/~zulu/research/seminor02/
    http://turtle.ee.ncku.edu.tw/~zulu/research/
    JRG

Maybe you are looking for

  • OR operator in places query. Can't get it to work.

    I got the follow and neither work. How do I get OR to work? place:terms=word1 OR word2&domain=www.google<i></i>.com&domainIsHost=true&expandQueries=true&queryType=1<br /> place:terms=word1ORword2&domain=www.google<i></i>.com&domainIsHost=true&expandQ

  • Disp+work.exe is yellow!!

    Hi,everyone: I met a problem. In MMC  the status of disp+work.exe is yellow. I restarted the service but not work. Will I have to uninstall the system?If so,I will have to redo the post-installation,and it is terrible. The deloper trace of disp+work.

  • To use the interface creating a container

    Hello, I read around that is normal thing write Set<String> set = new HashSet<String>() in place of HashSet<String> set = new HasSet<String>(); I read the same with other containers too (Map = new HashMap, List = new ArrayList). I don't understand th

  • Mpd clients disconnecting too often

    For about a month I can see a weird issue with mpd: from time to time (about 10 to 10 minutes) sonata (and any other client) loses connection to mpd, then reconnects. Yesterday I installed mpdscribble for submitting my tracks to last.fm and watching

  • OS X Server setup advice needed for small business

    I work as audio engineer at a recording studio. I'm an experienced Mac user, but I don't have Mac Server experience. I'm my company's default IT guy. Our office consists of four people, currently using PCs, but we are changing to a Mac-based office: