A trigger to run an InDesign javascript at regular intervals...

I have a javascript that needs to run in Adobe InDesign CS3 for Windows at regular intervals, say every five minutes. The purpose of the script is to test the latency of our production servers - it opens a test document, places an image, formats some text, closes and saves the document. At the end of the routine, it writes the elapsed time for this process to a log file which is monitored. This allows us to track the condition of the network and i/o on the servers since all of the test docs are opened across our network from a user work station. The script itself works very nicely but I'm looking for a way to trigger it at a timed interval. I be interested to hear any ideas the group has on how this can be done. Thanks in advance, Will

In CS5, you can use idleTask to run the script using ExtendScript.
Here's a tip on one way to go about it in AppleScript:
http://forums.macrumors.com/showthread.php?t=586719
Harbs

Similar Messages

  • Running batches of threads at regular intervals

    My requirement is to run a batch of threads, one after the other, at regular intervals. The idea is to get a summary of each batch at the completion of the same. The interval between two batches of threads is less than the time a batch takes to execute completely. Since I need the summary at the end of each batch, I am using a join() statement to wait for completion of all threads in that batch.
    Each batch is in turn a thread.
    The problem arises when I want to start these batches at intervals which are less than the time a batch would take to execute. Any pointers on how to tackle this?

    You could have a main thread for each batch which holds all the Threads for the work in a collection then, once it's launched them all it simply runs through the collection of Threads joining each (order is irrelevant, since if you call join on a thread that's already finished it returns immediately. Once all the worker threads have been joined the batch thread outputs the summary.
    You probably need to ensure that the summaries don't interleave on your output. You can achieve this simply by making the report delivery section of the batch thread synchronized on some common object.

  • How to run InDesign Javascript without Interruption

    Hi all,
    I want to run InDesign Javascript, while running the script nobody should interrupt. How to do it???
    Thanks in Advance,
    Mahesh

    [Jongware] wrote:
    You might also ask the user to un-plug the keyboard, let the script run, and then plug in the 'board again. (Altho' that might lead to a practical problem: "Remove keyboard, then press any key to continue". I'll leave that to solve for the OP.)

  • Indesign Javascript *.pdf in counter

    Hi all
    just want to ask if there is a way  to count pdf files in directory via Indesign Javascript. Thanks for advice.

    Is it possible to run this code in indesign javascript?
    I was able to run Acrobat scripts  only from InDesign 5.0.3 (with Acrobat 8.0.0 on Windows XP SP3).
    Here is an example and here is a thread on the topic.

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

  • I want to find the image tag name from Image layer name InDesign JavaScript?

    I want to find the image tag name from Image layer name InDesign JavaScript?

    Hi,
    You can use following script to fetch image tag name and the layer name on which it lie:
    var imgBox = app.activeDocument.rectangles // fetch all rectangular frames from the active document
    for(var i = 0; i< imgBox.length; i++)
      if(null != imgBox[i].associatedXMLElement )
                var b = imgBox[i]
               alert("Image tag name "+imgBox[i].associatedXMLElement.markupTag.name + "\n exist on layer " + imgBox[i].itemLayer.name)
    Hope this would help you to resolve your problem.

  • InDesign JavaScript "help" file

    I have used Jongware's InDesign JavaScript help files and have really found them essential. I am grateful for his efforts to make these available.
    I am primarily a FrameMaker user and Adobe is going to provide ExtendScript support for the next version of FrameMaker. The FrameMaker object model is shown in the ExtendScript Toolkit CS5 Object Model Viewer. I would like to do something similar to what Jongware did in extracting the data to a series of HTML files. I am having difficulty figuring out where this data is stored. I can't find an XML file that contains the data. I am mainly posting this here because I haven't been able to contact Jongware directly. Thanks in advance for any help.
    Rick

    Oops :-) Yeah to avoid sp@m I don't really want to post my mail addresses on public sites.
    I sent you a P.M., I'm hugely interested in what you are planning!

  • IDCS2 How to make excel automation in Indesign Javascripting?

    Hi all,
    I have an excel sheet with several columns.I need to replace one of the column in the excel sheet with another set of values using (Indesign)javascript.
    Please help.
    Provide me with code snippets.
    Regards
    amu

    >in the excel sheet [...] using (Indesign)javascript
    It seems to me you think that javascript ("InDesign" JS??) can control any application on your computer.
    Not so.
    InDesign has 'generic' support for external programming languages. It can be controlled using JavaScript, Visual Basic for Applications (on Windows), AppleScript (on the Mac), and COM-aware programs, such as C++. The support for this is built-in into InDesign.
    Excel has built-in support for Visual Basic. This probably means you can steer both Excel and ID from within the same VB -- I know it's possible through Word -- but has nothing to do with JS. Or with InDesign's support for JS. Or InDesign Scripting in general.
    So, is it possible with VB? Well, it might be, but you might want to ask that one on a Microsoft forum, or this one:
    >Provide me with code snippets.
    (snip)

  • Why not create a Indesign Javascripts web library ?

    Hi all,
    I see a lot of scripts passing by in this forum. I thought it would be very helpful to gather them in a library. It could look like a web site like this one for applescript
    http://olivier.berquin.free.fr/indesign/indesign_cs2.html
    We could have a "menu" frame on the left side with common principles (open, create, loop, for, whatever...)
    We could have too a Index on a page with script names associated with general terms like
    Page
    addPages.jsx
    removePages.jsx
    (Don't look at them, they are fake names)
    Maybe it already exists and I would be pleased to hear it (and know how to reach it :-)). But if not, this kind of library would be a very interesting resource.
    The idea is to have a look on existing scripts and aggregate bricks for new one. With time, the library is growing more & more.
    Maybe another Utopia, but I drop the idea.
    BTW, I don't know how to create a site but I guess it could be a very simple one.
    What do you think ?
    Loic

    Welcome on board, I will have a look at 12/13h00 on wiki, come back with news asap.
    Loic
    De :
    xbytor <[email protected]>
    Ã :
    [email protected]
    Envoyé le :
    Mercredi, 19 Novembre 2008, 5h02mn 46s
    Objet :
    Re: Why not create a Indesign Javascripts web library ?
    A new message was posted by xbytor in
    InDesign Scripting --
    Why not create a Indesign
    Javascripts web library ?
    > loic_aigon X yahoo.fr (X is what you know)
    Moi?
    -X
    View/reply at <
    http://www.adobeforums.com/webx?13@@.59b70ae3/7>
    Replies by email are OK.
    Use the unsubscribe form at <
    http://www.adobeforums.com/webx?280@@.59b70ae3!folder=.eea52bc> to cancel your email subscription.

  • I need this indesign cs3 script to run under Indesign cs2

    This is paragraph changes script which is run under indesign cs 3, I need this  script to run under my indesign cs 2, can anyone help me pls?. thank you  in advance
        Fixing paragraph style combinations
        Version: 1.1
        Script by Thomas Silkjær
        http://indesigning.net/
    var the_document = app.documents.item(0);
    // Create a list of paragraph styles
    var list_of_paragraph_styles = the_document.paragraphStyles.everyItem().name;
    // Make the dialog box for selecting the paragraph styles
    var the_dialog = app.dialogs.add({name:"Fix paragraph style pairs"});
    with(the_dialog.dialogColumns.add()){
        with(dialogRows.add()){
            staticTexts.add({staticLabel:"Find:"});
        with(borderPanels.add()){
            var find_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
            staticTexts.add({staticLabel:"followed by"});
            var find_second_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
        with(dialogRows.add()){
            staticTexts.add({staticLabel:"Change:"});
        with(borderPanels.add()){
            var change_first_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
            staticTexts.add({staticLabel:"followed by"});
            var change_second_paragraph = dropdowns.add({stringList:list_of_paragraph_styles, selectedIndex:0});
    the_dialog.show();
    // Define paragraph styles
    var find_first_paragraph = the_document.paragraphStyles.item(find_first_paragraph.selectedIndex);
    var find_second_paragraph = the_document.paragraphStyles.item(find_second_paragraph.selectedIndex);
    var change_first_paragraph = the_document.paragraphStyles.item(change_first_paragraph.selectedIndex);
    var change_second_paragraph = the_document.paragraphStyles.item(change_second_paragraph.selectedIndex);
    // Set find grep preferences to find all paragraphs with the first selected paragraph style
    app.findChangeGrepOptions.includeFootnotes = false;
    app.findChangeGrepOptions.includeHiddenLayers = false;
    app.findChangeGrepOptions.includeLockedLayersForFind = false;
    app.findChangeGrepOptions.includeLockedStoriesForFind = false;
    app.findChangeGrepOptions.includeMasterPages = false;
    app.findGrepPreferences = NothingEnum.nothing;
    app.findGrepPreferences.appliedParagraphStyle = find_first_paragraph;
    app.findGrepPreferences.findWhat = "^";
    //Search the current story
    var the_story = app.selection[0].parentStory;
    var found_paragraphs = the_story.findGrep();
    var change_first_list = [];
    var change_second_list = [];
    // Loop through the paragraphs and create a list of words and mark them as index words
    myCounter = 0;
    do {
        try {
            // Create an object reference to the found paragraph and the next
            var first_paragraph = found_paragraphs[myCounter].paragraphs.firstItem();
            var next_paragraph = first_paragraph.paragraphs[-1].insertionPoints[-1].paragraphs[0];
            // Check if the next paragraph is equal to the find_second_paragraph
            if(next_paragraph.appliedParagraphStyle == find_second_paragraph) {
                    change_first_list.push(first_paragraph);
                    change_second_list.push(next_paragraph);
        } catch(err) {}
        myCounter++;
    } while (myCounter < found_paragraphs.length);
    // Apply paragraph styles
    myCounter = 0;
    do {
        change_first_list[myCounter].appliedParagraphStyle = change_first_paragraph;
        change_second_list[myCounter].appliedParagraphStyle = change_second_paragraph;
        myCounter++;
    } while (myCounter < change_first_list.length);
    alert("Done fixing pairs!");

    CS2 didn't support grep searches so you're going to have to do some serious reworking of the script. It's not a flick of the wrists.
    Dave

  • Interact with indesign javascript through Jtree

    i can display indesign script files in tree view. what is my question is if i click the indesign javascript file i want
    to execute. that means i want to interact with java swing to indesign cs3. How it is possible could anyone tell me.

    Welcome to the Sun forums.
    >
    i can display indesign script files in tree view. what is my question is if i click the indesign javascript file i want
    to execute. that means i want to interact with java swing to indesign cs3. How it is possible could anyone tell me.>About the only way you will be able to get interaction between a JTree and JavaScript is to put the JTree in a JApplet and put that applet in a web page that also references the scripts.
    As far as Java/JS interaction go, look to [Real's HowTo|http://www.rgagnon.com/howto.html] (<- link) and the categories 'Java|JavaScript Interaction' & 'JavaScript|Interaction with Java'.
    Testing will be a hassle, since the AppletViewer does not support Java/JS interaction and browsers cache the classes. Not that applet development is not a PITA to start with.
    And a few points before closing:
    - All sentences should start with a single upper case letter. This helps the reader to quickly scan text, looking for ways they can help. You would not want to make it harder for people who are trying to help, would you?
    - The word 'I' should be always upper case, always.
    - ..and it is JTree, not Jtree. Please be very careful with class names so we can all be sure you refer to J2SE classes, and not some 3rd part class about which we know nothing and do not support.
    Edited by: AndrewThompson64 on Jul 6, 2009 9:19 PM

  • How to run an "Automator" application at regular time intervals

    I would like to find out how to run an "Automator" application at regular time intervals, say at every 5 minutes.
    Is there any program, AppleScript or any method to do this?
    I would very much appreciate a help.
    Suwan

    save your workflow as an ical plugin, this will automatically insert the workflow into ical,and create a workflow category for it, then just set to repeat every 5 minutes, or save as an APP and use a program called CRONIX (freeware) to run the schedule.

  • What file/registry permissions are required to run MultiSim 7 as a regular user?

    I want to be able to run MultiSim 7 as a regular user (since our students obviously do not have administrative permissions/rights).
    I can't quite figure out what file and registry permissions are required to be able to do this (despite using Filemon and Regmon).

    Hi,
    If you are refering to the "failed to update registry" warning message, do this:
    1.  Click Start-->Run
    2.  Type "regedt32"
    3.  Locate HKEY_Classes_Root/Multisim.Document
    4.  On the menu, select Security-->Permission (win 2000), For  XP select Edit-->Permission
    5.  Give full control for everyone
    6.  Repeat step 3-->5 for:
    HKEY_Classes_Root/CLSID/{2D964073-9BC9-11D1-840B-006008AC6551}
    Regards,
    Tien Pham
    EWB Support
    Tien P.
    National Instruments

  • (InDesign CS5)I have created hundreds of InDesign documents incorporating images stored on an external USB connected drive. I did a manual back-up to another drive at regular intervals but far from ideal. I now have a network drive which is properly backe

    (InDesign CS5) I have created hundreds of InDesign documents incorporating images stored on an external USB connected drive. I did a manual back-up to another drive at regular intervals but far from ideal.
    I now have a network drive which is properly backed-up. I have copied all of the images and folder structure from the USB connected drive to this new drive.
    My question is how I get all of the links in my indd files to point to the new drive. I am aware how to do it one file at a time, but is there a way of doing the same thing over many files/folders at a time?

    It depends on how you organize your work. If you have one folder for images for a document, relinking one image should alert you that other missing images are in the same folder, but this assumes that images are missing. If the links window sees a clear path to the original location of the images, they aren't missing, so that won't work.
    Another thing to try is to select all of the images in the links window and go to the fly-out menu and select Relink To Folder (navigate to the new folder, and you don't even have to select any images by name).
    If you store your images in many different folders for the same document, you might want to either package the document to copy all of the images into one folder (you can specify to only copy images if you like) or use the fly-out in the links window (Utilities>Copy Links To…) and select or create a new images folder.

  • How to know the platform through InDesign javascript?

    Hi
    I want to find the platform (Windows/Mac) of the running indesign using javascript,
    eg:  alert(app.name);
    will result "Adobe InDesign"
    like the same way, is there any way to find the platform ?
    please anyone suggest a solution for this
    Thank you!
    Vimal

    You can try
    alert($.os);
    this will return the exact platform name and you can maybe check for the string whether it contains Windows or Mac in it
    -Javed

Maybe you are looking for

  • How I can access "Convert Colors..." button in Adobe Acrobat XI using applescript, or add this button to menu bar?

    Hi, I'm writing applescript to automate Adobe Acrobat XI, I'm missing only one line of code - opening dialog window of "Convert Colors..." tool. It was easy in Acrobat 9 but some reason it's complicated in Acrobat XI. Is there an option to add "Conve

  • External Tables to Unix File System 10G R2

    Can anyone help with setting up an external table that reads a flat file from a Unix File system. I have sampled a file ok and created an external table and deployed it to the database ok but it can find the link through to the unix file system to re

  • Its urgent.Please send me the solution.

    Please find me a solution for the specifications. Its urgent. Please send me the details as early as possible. Requirements: 1.     EDI Invoice requires populating bottle UPC number not case UPC in IDOC and also populates customer PO number when invo

  • Annotations for adobe reader

    Hi there I use adobe reader for college and find it perfect. This week I have tried to add notes and highlight different parts o the lecture notes and I can't find the annotation button. I have deleted the app and reinstalled it but the same thing ha

  • What good is image capture?

    I have scanned a few things on my Epson 2450. It comes up in image capture. But the image cannot be moved, saved, anything. I do have PE2, but also don't have the linkage to the 2450. I have some expensive paper weights here unless I can somehow use