Convert or reuse of Applescript, JavaScript for InDesign?

A colleague has developed this script to import comics in a template as shown below, and I read up on Javascript trying to figure out how to convert it for use in the windows environment:

-This script will open an Adobe Indesign page for the comic strip and run all the files of comics for the selected date.
displayString set to 'Please enter year. "
the value DYear (year of the (current date))
the value of response to display the default answer of dialogue displayString DYear
set the number of (text returned of response) under the number
DYear set to text returned of response
displayString set to 'Please enter month. "
Set Dmonth to the shell script ' date «+ %m «»
the value of response to display the default answer of dialogue displayString Dmonth
set the number of (text returned of response) under the number
Set Dmonth to text returned of response
displayString set to 'Please enter Day. "
Set of Dday (time of the (current date)) + 1
the value of response to display the default answer of dialogue displayString Dday
set the number of (text returned of response) under the number
Dday set to text returned of response
Tell application "Adobe InDesign CS4"
comic1 value ' macintosh Hd:users:marshall:documents:comics: "& DYear & Dmonth & Dday & ' pzjud - a.tif".
the value in the "macintosh hd:users:marshall:documents:comics:fct" comic2 & DYear & Dmonth & Dday ".tif".
the value in the "macintosh hd:users:marshall:documents:comics:det" comic3 & DYear & Dmonth & Dday ".tif".
the value comic4 "Macintosh HD:users:marshall:documents:comics:bbt" & DYear & Dmonth & Dday ".tif".
the value comic5 to the "Macintosh HD:users:marshall:documents:comics:blt" & Dmonth & DYear, Dday ".tif".
Set mydoc to open "Macintosh HD:users:marshall:documents:comix:GGDailyBlank.indd".
say mydoc
page 1 to say
myrect1 Set of page called "image1".
myrect2 Set of page called "image2".
myrect3 Set of page called 'image3 '.
myrect4 Set of page called "image4.
myrect5 Set of page called "picture5.
say myrect1
Set myGraphic to place (comic1 as string)
made myrect1 seen the content framework
tell the end
say myrect2
Set myGraphic to place (comic2 as string)
adapt given myrect2 content to the frame
tell the end
say myrect3
Set myGraphic to place (comic3 as string)
made myrect3 seen the content framework
tell the end
say myrect4
Set myGraphic to place (comic4 as string)
made myrect4 seen the content framework
tell the end
say myrect5
Set myGraphic to place (comic5 as string)
made myrect5 seen the content framework
tell the end
tell the end
tell the end

-------------------------------------------------------

Any tips or ideas to help me get started with this?  Most of the tutorials I read deal with text and images.

Thanks for any help!

Doug

Nice OK and you are welcome.

Please indicate the last message with the script updated as replied correctly, whereas others may benefit from and that I can have my hard earned 10 points ;-)

Tags: InDesign

Similar Questions

  • How to change the javascript for Indesign cs 5 in a version for cc

    Hello

    I have a javascript for Indesign CS5, but I want to use it in Indesign CC, but it won't work

    What should I do, if I can use the script in Indesign CC?

    Kind regards

    EVI

    Why did you change to 10? It must be 5.

  • Simple Indesign AppleScript Javascript conversion

    Hello

    I have used it as a simple Indesign AppleScript, but need to convert it into javascript and have no prior experience.  I read the document Adobe pdf on the scripts and it's great, it shows the differences between the 3 (as, js, vb), but I still have a problem to find how would that conver.  Anyone would be able to show me the converted result?

    AppleScript:

    Tell application "Adobe InDesign CS5.5"

    say to all documents
    whole visible layer ' Interactive - Web ' true
    whole visible layer ' Interactive - Print ' false
    tell the end
    tell the end

    JavaScript:

    myDocuments var = app.documents.everyItem (); something like that?

    It mask/poster of the visibility of the 2 specific layers for all open documents.  I pretty much need to hide/show specific 2 layers book ina and this should / can accomplish this.

    Thanks for any help!

    This should work:

    var documentsArray = app.documents.everyItem().getElements();
    for (var i = 0; i < documentsArray.length; i++) {
              var document = documentsArray[i];
              var layers = document.layers;
              layers.itemByName("Interactive - Web").visible = true;
              layers.itemByName("Interactive - Print").visible = false;
    }
    

    In addition, it might be possible to do without using 'getElements' that 'solves the object specifier", thus avoiding the loop 'for '. Something like this:

    app.documents.everyItem().layers.itemByName("Interactive - Web").visible = true;
    app.documents.everyItem().layers.itemByName("Interactive - Print").visible = false;
    
  • Is it possible to convert the selected text in javascript lines?

    Hi all

    I put a word to indesign cs 5.5 file is almost in a single table, I need to separate the text of the actual tables, is it possible to convert the selected text in javascript lines?

    If there is no way to do that, someone can help me to make a script to cut selected lines and place it in the right holders of the table pointer to make independent table and then convert to text?

    Hey brother,

    Simply select the rows or cells represent the lines and then run this Javascript code snippet:

    for (var r = 0; r < app.selection.length; r++) {
        for (var t = 0; t < app.selection[r].rows.length; t++) {
            for (var u = 0; u < app.selection[r].rows[t].cells.length; u++) {
                for (var c = 0; c < app.selection[r].rows[t].cells[u].paragraphs.length; c++) {
                    app.selection[r].rows[t].cells[u].paragraphs[0].move (LocationOptions.AFTER, app.selection[r].rows[t].parent.parent.storyOffset);
                    if (c < app.selection[r].rows[t].cells[u].paragraphs.length - 1)
                        app.selection[r].rows[t].parent.parent.storyOffset.contents += "\r";
                }
                if (u < app.selection[r].rows[t].cells.length - 1) {
                    app.selection[r].rows[t].parent.parent.storyOffset.contents += "\t";
                }
                else {
                    app.selection[r].rows[t].parent.parent.storyOffset.contents += "\r";
                }
            }
        }
    }
    for (var r = 0; r < app.selection.length; r++) {
        for (var t = app.selection[r].rows.length - 1; t >= 0; t--) {
            app.selection[r].rows[t].remove ();
        }
    }
    
  • Where can I get a list of the error codes for InDesign server

    I use InDesign server to the process that a lot of jobs and could not find a list of error codes generated by InDesign Server. Specifically, I'm looking for error codes generated in cases where the InDesign customer seem to have made a mistake. To give an analogy, the Apache HTTP Server generates class 4xx Code of the status each time the client seems to have erred. Is there a list of error codes similar for InDesign server.

    For example:, I wrote a work to convert .indd idml files and voluntarily gave a corrupt .indd file to convert. I got the following response code.

    Error code: 29441

    Error message: could not open the file "corrupt_file.indd". Adobe InDesign Server can not supported file format, a plug-in that supports the file format is may be missing, or the file may be open in another application.

    I couldn't find a reference to the error code 29441 in the Adobe documentation. All leads or references?

    Thank you

    Michel

    You can download here CS6 server error codes:

    Dropbox - errorcodes.htm

  • Scripts for indesign

    Hi all.  I wonder if there is a script for indesign that allow me to put the file name / and identifiers of color at the bottom of the Document.  Also, who will all place me information where I want.  For ex...   I want to send a task to plates and rather than manually enter the name of the file - Date and time - and colors on the bottom of the plate/file.  I know that when I go to export a file or print a file it is check box to put the information on the file page and it does what I want however he put the information too low on the plate.  He added the information down into the corner of the plate area and receiving not Burnt or processed in this area.  I need a script to back up the information, if we read.

    Hi cbishop01,

    First of all, I would not recommend research by sending your files to Indesign as postscript, if your normal process is a PDF workflow. PostScript does not support some features on various output devices. When the postscript from Indesign, you can run into CMYK printing issues when dealing with PDF files and other works of art that contain some transparency effects and mixing modes that cannot be interpreted by the postscript or cannot flatten properly.

    My employer uses a script Indesign, we have developed which can be something similar to what you are looking to accomplish. If your plate is always the same size, you can create a model of tax file in Indesign with job info, color chart, date and time, and you want to integrate the model tax. You can use a script Indesign to automatically update the model every time that you print in PDF format (which can be done by adding a custom ease menu item).

    Plate files vary from a file in a file, you can convert the file name, time, blocks of color name text in an Indesign library item and drop it right in the position desired on each individual plate installation. You will not have to change these items, you will only place a group element where you want to go.

    Is this something that will work for you?

    (example of a model of plate file)

    (example of slug color library item)

  • AppleScript javascript submit in safari

    Hello

    I have a script that is supposed to make a lot of stuffs on safari like by checking the boxes radio and all, save then submit.

    However, when you click the button submit - manually / script, it'll be a pop-up with the options "OK or cancel.

    Tell application "Safari".

    -This triggers the pop-up window

    make JavaScript ("document.getElementById('submitButton').click ()" "") in the document 1

    -try clicking on the ok button using some knowledge I know

    tell application "system" key code 36 events

    Tell application "system events" to indicate the process "Safari".

    If there is (button "OK" in the window 1) then

    Click (button "OK" in the window 1)

    end if

    tell the end

    I think that the main problem is the script 'expects' to c line Javascript for a response to an OK or cancel before it continues to enter the rest of the script as hit running or clicking OK / Cancel. It is not a new window and the popup window can't be drag/drop.

    Is there a way to fix this?

    The pop up similar to what appears in the middle of my safari page, undraggable and cannot inspect element.

  • How to block the javascript for custom websites?

    Sometimes, I need to not allow javascript for certain sites only. I can do this at the opera. Is this possible in FireFox?

    For example, I don't like the JavaScript on google.com when I'm looking for images because the images (thumbnails) increase in size on the mouse on. Can I disable javascript for google.com only?

    It is not an integrated way to do this, but you can add this functionality by using the YesScript add-on.

  • Problem in javascript for OS 6 API extension

    I wrote an application for smartphone using Webworks with javascript extension. I created a JavaScript library using barcode API of OS 6.0. Ideally WebWorks support OS 5.0 and above so that any javascript extension written using OS6.0 API should work. I followed the direction:

    http://docs.BlackBerry.com/en/developers/subcategories/?usertype=21&category=BlackBerry+WebWorks+for...

    I created a library for barcode scanner added this library in my webworks app and try to compile. It gives me error all the APIs I took the OS 6.0. as

    ********************************************************************************

    DemoProject BUILDING

    cmd.exe /c bbwp D:\abc\projects\webworks\workspace\DemoProject\build\DemoProject.zip/o D:\Manish_Ranjan\projects\webworks\workspace\DemoProject\build

    [INFO]                  Parsing of the command line options

    [INFO]                  Bbwp.properties analysis

    [INFO]                  Validation of archive application

    [INFO]                  The analysis of config.xml

    [INFO]                  The application of filling source

    [INFO]                  Compilation of application BlackBerry WebWorks

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:8: package net.rim.device.api.barcodelib does not exist

    Import net.rim.device.api.barcodelib.BarcodeDecoder;

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:9: package net.rim.device.api.barcodelib does not exist

    Import net.rim.device.api.barcodelib.BarcodeDecoderListener;

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:10: package net.rim.device.api.barcodelib does not exist

    Import net.rim.device.api.barcodelib.BarcodeScanner;

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:18: package com.google.zxing does not exist

    import com.google.zxing.BarcodeFormat;

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:19: package com.google.zxing does not exist

    import com.google.zxing.DecodeHintType;

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:59: cannot find symbol

    symbol: BarcodeScanner class

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    private BarcodeScanner _scanner;

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:70: cannot find symbol

    symbol: variable BarcodeFormat

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    formats.addElement (BarcodeFormat.QR_CODE);

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:72: cannot find symbol

    symbol: variable DecodeHintType

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    hints.put (DecodeHintType.POSSIBLE_FORMATS, formats);

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:75: cannot find symbol

    symbol: BarcodeDecoder, class

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    Decoder BarcodeDecoder = new BarcodeDecoder (hints);

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:75: cannot find symbol

    symbol: BarcodeDecoder, class

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    Decoder BarcodeDecoder = new BarcodeDecoder (hints);

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:80: cannot find symbol

    symbol: BarcodeDecoderListener, class

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    BarcodeDecoderListener decoderListener = new BarcodeDecoderListener() {}

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:80: cannot find symbol

    symbol: BarcodeDecoderListener, class

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    BarcodeDecoderListener decoderListener = new BarcodeDecoderListener() {}

    ^

    C:\Users\abc\AppData\Local\Temp\widgetGen.1978923101309259162010.tmp\extension\barcode\BarcodeFunction.Java:92: cannot find symbol

    symbol: BarcodeScanner class

    Location: class bar code. BarcodeFunction.ViewFinderScreen

    _scanner = new BarcodeScanner (decoder, decoderListener);

    In my extension javascript library.xml file I defined the platform tag.

    Although if I write any extension of javascript for the API available in OS 5.0 that works very well. Is there something more I need to follow for OS 6.0 API-specific javascript extension?

    Thank you

    Manish

    The question that you are running is the WebWorks SDK provided with the library net_rim_api.jar for BB5.  This means that the BB6 API are not in this library link to.

    We are looking to add a new net_rim_api.jar to the SDK so that people can take advantage of the API of BB6.  However, do not know if you are using a BB6 API your app does not work on BB5.  When the application starts, it will get a link error because the API expected is not present.

    You can make your extension work on BB6 by downloading the Java SDK and copy the net_rim_api.jar file and place it in your SDK WebWorks... I believe in the SDK WebWorks is in your directory "lib".

  • How to convert a file SQM a PBO for Arma 2 file?

    How to convert a file SQM a PBO for Arma 2 file?  First, use the editor in Arma 2.  Then I save on user or single-mission I want to play a custom mission.

    Hi Tom,

    Thanks for posting the question in the Microsoft Community!

    You want to convert file SQM PBO.

    You can use a file converter software to convert file SQM PBO.

    You can use your favorite search engine to find the appropriate file converter.

    Warning: Using third-party software, including hardware drivers can cause serious problems that may prevent your computer from starting properly. Microsoft cannot guarantee that problems resulting from the use of third-party software can be solved. Software using third party is at your own risk.

    For any question related to Windows, feel free to contact us.

  • Can I reuse fields to event for various events?

    Hello

    Can I reuse fields to event for various events?

    Thank you

    Hello

    Yes, you can reuse these Email fields in different events as long as they are the same field names. Data are populated based on the field for the event.

    Thank you

    edynamic expert Eloqua

  • When Adobe will approve the Acrolinx for InDesign CC 2015 plugin?

    When Adobe will approve the Acrolinx for InDesign CC 2015 plugin?

    [Movement of the general, all Adobe forums lounge to a specific forum - MOD]

    Published last week... that's what you're looking for?

    https://creative.Adobe.com/addons/products/16031#.V7TvM5MrKEI

  • WebCenter Capture - how to debug javascript for import processor

    Javascript for import processor code is server-side.  Therefore, it does not println in the java console.

    How to debug a process of import or of javascript recognition process?

    Thank you

    you will use the standard recorder instead of the println function. as you say, that only works for running javascript on the client side.

    See doc-id 1946012.1 for a good example.

    hope this helps,

    -ryan

  • Replace Cropbox Acrobat Javascript for automation

    Hello world

    I am access some data inside the bowl of doc PDF Javascript for automation of OSX

    I can get the cropBox... "var cropBoxx = acro.activeDoc.pages.cropBox ();

    But how can I SET the cropbox

    ' acro.activeDoc.pages.cropBox.value ='0, 1224, 192, 612'; '... does not work

    Maybe I'm far from the best way to send data to acrobat

    Can someone guide me

    Thank you

    Okay i ' v got

    At least I can put it on a specific page

    acro.activeDoc.pages[0].cropBox = [0, 1224, 192, 612];

  • Hello, I bought a monthly license paid for indesign last night and I do not understand how to play with it? When I opened the window of creative cloud, they suggested me to buy indesign (but I bought it already...) Please, help me... It's easy to al amend

    Hello, I bought a monthly license paid for indesign last night and I do not understand how to play with it? When I opened the window of creative cloud, they suggested me to buy indesign (but I bought it already...) Please, help me... This is our easy to understand for beginners like me at all

    FAQ: What should I do if I have a subscription, but my application acts as if I had a trial?

    https://forums.Adobe.com/thread/1962238

    Download/install the desktop application, connect and install applications subscription.

    https://helpx.Adobe.com/creative-cloud/help/download-install-app.html

    Creative cloud to desktop

    https://helpx.Adobe.com/creative-cloud/help/creative-cloud-desktop.html

    Sign out, sign in | Creative office cloud app

    http://helpx.Adobe.com/creative-cloud/KB/sign-in-out-creative-cloud-desktop-app.html

    Install, update, or uninstall applications

    http://helpx.Adobe.com/creative-cloud/help/install-apps.html

Maybe you are looking for

  • Privileged calculator HP - NORMALD_CDF and NORMALD_ICDF problem

    Normal distribution functions do not work as documented.  The entries are average, standard deviation and X or probability according to the function.  In all cases, the functions ignore the entry of mean values and standard deviation and assumes that

  • Tecra A6 does not start with battery only

    Hi allI'm having a strange problem with a Tecra A6 I picked up recently at the refurb because it does not start with a battery only: it starts only when / sector is also connected, but eventually DΘmarrer on battery alone (and works fine) with the po

  • A Merry Christmas and a happy new year

    A Merry Christmas and a Happy, healthy and prosperous new year to you all the wonderful supporters.  Thank you for your wonderful help and informative over the years, it's very appreciated. Thank you rachealfromva

  • Historical research Google clears never when I clear the history browser and data

    I have a question that I barely noticed what is happening, it has never been a problem before. If I wanted to erase all of my internet history, (including searches on google), then all I do is go to settings, safari, clear history and data from the W

  • Rapid drop window problem

    The Quick Drop window is now extended (see below) and I do not know how to return to its original size. What should I do?