InDesign Script to find images w/ prefix code, place img on page along with file name.

Hello,
I'm looking for an InDesign script that will prompt me for a code/text, this code/text will be the prefix of images in the sever, and then return the images found with this prefix by placing them on the document page and also display their file names in a text box. Is there such a script out there that anyone recommends. Thank you for your help. I'm on a Mac, using InDesign CS6, Javascript or any other would do.

Hello,
I'm looking for an InDesign script that will prompt me for a code/text, this code/text will be the prefix of images in the sever, and then return the images found with this prefix by placing them on the document page and also display their file names in a text box. Is there such a script out there that anyone recommends. Thank you for your help. I'm on a Mac, using InDesign CS6, Javascript or any other would do.

Similar Messages

  • Poweshell script to parse a XML document to get all Leaf level nodes with Node names in CSV

    Hi Experts,
    I want to write a Powershell script to parse a XML document to get all Leaf level nodes with Node names in CSV
    <?xml version="1.0" encoding="UTF-8"?>
    <CATALOG>
       <CD>
          <TITLE>Empire Burlesque</TITLE>
          <ARTIST>Bob Dylan</ARTIST>
          <COUNTRY>USA</COUNTRY>
          <COMPANY>Columbia</COMPANY>
          <PRICE>10.90</PRICE>
          <YEAR>1985</YEAR>
       </CD>
    </CATALOG>
    Need to display this as
    CD_Tiltle, CD_ARTIST, CD_COUNTRY, CD_COMPANY, CD_PRICE, CD_YEAR
    Empire Burlesque, Bob Dylan,USA,Columbia,10.90,1985
    and so on..
    I do not want to hard code the tag names in the script.
    current example is 2 level hierarchy XML can be many level till 10 max I assume
    in that case the csv file field name will be like P1_P2_P3_NodeName as so on..
    Thanks in advance
    Prajesh

    Thankfully, I have writtenscript for ths same $node_name="";
    $node_value="";
    $reader = [system.Xml.XmlReader]::Create($xmlfile)
    while ($reader.Read())
    while ($reader.Read())
    if ($reader.IsStartElement())
    $node_name += "," + $reader.Name.ToString();
    if ($reader.Read())
    $node_value += "," + $reader.Value.Trim();
    Thanks and Regards, Prajesh Please use Marked as Answer if my post solved your problem and use Vote As Helpful if a post was useful.

  • How to get the source code of an HTML page in Text file Through J2EE

    How to get the source code of an HTML page in Text file Through J2EE?

    Huh? If you want something like your browser's "view source" command, simply use a URLConnection and read in the data from the URL in question. If the HTML page is instead locally on your machine, use a FileInputStream. There's no magic invovled either way.
    - Saish

  • How to get the source code of an HTML page in Text file Through java?

    How to get the source code of an HTML page in Text file Through java?
    I am coding an application.one module of that application is given below:
    The first part of the application is to connect our application to the existing HTML form.
    This module would make a connection with the HTML page. The HTML page contains the coding for the Form with various elements. The form may be a simple form with one or two fields or a complex one like the form for registering for a new Bank Account or new email account.
    The module will first connect through the HTML page and will fetch the HTML code into a Text File so that the code can be further processed.
    Could any body provide coding hint for that

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • How to get multiple image resoultion and paste it in new ms word doc or ecxel with file name

    Hi any one help me to get the imge resolution and paste it in new ms word or excel
    i have 100 file i fixed the sizing for all the file by downsample using javascript
    i want to get the resolution of all the image and paste it with file name
    anyone please help me
    Thank you

    Hi any one help me to get the imge resolution and paste it in new ms word or excel
    i have 100 file i fixed the sizing for all the file by downsample using javascript
    i want to get the resolution of all the image and paste it with file name
    anyone please help me
    Thank you

  • It can't find URL when i use HLS for vod and the vod file name contain Chinese.

    It can't find URL when i use HLS for vod and the vod file name contain Chinese。eg: http://127.0.0.1:8134/hls-vod/你好.mp4.m3u8.
    How does it support Chinese path?

    To answer the post title FireFox save all downloads automatically in the download folder, which you can find in the Documents folder. If you want to choose where to save your downloads go to tools>options>check always ask me where to save files.
    Secondly, I am assuming you have IE 8 installed as this is the only version that supports this fix that is currently not in beta. Go to control panel>internet options>advanced tab and reset the settings at the bottom. This may or may not fix the problem but it is a good first step.

  • InDesign script to find a superscript

    Am very new to javascript scripting with InDesign CS4. A simple question: What would I put in a FindChangeList text file in order to find superscript text? Have tried numerous variations without success. Thanks in advance.

    use
    {position:Position.superscript}

  • How to Write source code of a html page to a File

    Using this code i could find the source code of a html page from a web server
    import java.io.*;
    import java.net.*;
    public class SourceViewer{
    public static void main (String[] args) throws IOException{
    System.out.print("Enter url of local for viewing html source code: ");
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String url = br.readLine();
    try{
    URL u = new URL(url);
    HttpURLConnection uc = (HttpURLConnection) u.openConnection();
    int code = uc.getResponseCode();
    String response = uc.getResponseMessage();
    System.out.println("HTTP/1.x " + code + " " + response);
    for(int j = 1; ; j++){
    String header = uc.getHeaderField(j);
    String key = uc.getHeaderFieldKey(j);
    if(header == null || key == null)
    break;
    System.out.println(uc.getHeaderFieldKey(j) + ": " + header);
    InputStream in = new BufferedInputStream(uc.getInputStream());
    Reader r = new InputStreamReader(in);
    int c;
    while((c = r.read()) != -1){
    System.out.print((char)c);
    catch(MalformedURLException ex){
    System.err.println(url + " is not a valid URL.");
    catch(IOException ie){
    System.out.println("Input/Output Error: " + ie.getMessage());
    Iam not much a expert in java .. i could find some commands to write to a file but i dont know where to use those codes , some body please give me some idea ..
    thanking you ..

    You're welcome. How about awarding them duke stars?
    edit: cheers!

  • Concatenate sysdate with file name in shell script

    Hi,
    I have one shell script which i am using to transfer data(SFTP).
    Now I have one requirment to use sysdate along with the file name as the file name for the data being transfered.
    script is like this...
    function connect
    sftp $USER@$HOST <<END_SCRIPT
    lcd $FILE_DIR
    if [ $FILE="PO" ] then
    quote site recfm=fb
    quote site lrecl=230
    pwd
    put $FILE 'OPENPO'
    fi
    quit
    END_SCRIPT
    Can any one tell how i can concatenate sysdate with the file name (put $FILE 'OPENPO')?
    Thanks in Advance,
    RR

    it gets even easier with the 'scp' command.
    please try to use the "code" tags. it is very well possible the forum software did transform parts of your script.
    to get into 'code mode': put { c o d e } on a line (without the spaces), then the code, then { c o d e } again to switch back to normal mode.

  • Indesign script to find and replace from external excel file

    I have been asked to update an existing price list (set up as lots of small tables) in Indesign (500+  pages). I have been given a new Excel spreadsheet with the product codes and new prices. I am looking for some assistance on finding or creating a script that can do such a thing if at all possible to speed up the process over just copying and pasting. Does anyone have any suggestions or point me in the right direction?

    1. Your Excel conversion to FindChangeList format idea seems okay, apart from one thing: both findWhat and changeTo strings should have double quotes around them. As they are now,
    grep {findWhat:lang1"} {changeTo:"lang2} {incl...(etc.)
    the opening one after findWhat and the closing one after changeTo are missing.
    2. Your first line contains 2 definitions. Each separate definition should be on a line of its own. (This might occur elsewhere as well, didn't check.)
    3. Any double quotes inside strings will cause problems. Precede them with a backslash to 'escape' them and convert them to a literal character. I found this one:
    "(for IC5/8"V)"
    -- change to
    "(for IC5/8\"V)"
    4. Some of your strings start with double double quotes:
    changeTo:""(MITM刀具见254页 ...
    5. To prevent your problem with this order
    grep {findWhat:Inserts"} ...
    grep {findWhat:Inserts Ordering Code System"} ...
    sort your Excel list alphabetically, case preserving, in reverse order.
    You probably also want wholeWord:true, and caseSensitive:true.
    Hope this helps!

  • Images added to page have wrong file name

    I've been using iWeb ever since it came out and thought I knew everything I needed to know but am running into an unusual issue.
    I have a folder of images I call my originals. I copy them and place them into another folder called large. I run an Automator action to scale the images down to 750, rename the images large-001aa.jpg and also create a corresponding thumbnail folder and files. When I drag and drop these images into iWeb, the older filenames are there. The filename in iWeb and the actual filename do not match. It's as if it's pulling up an older filename from when the image was first created. I have deleted the page, quit iWeb, etc. What's going on here? Is it pulling old metadata or is there a cache I need to clear? Thanks for any help.

    Youtube video of the issue. It has audio but don't know why youtube isnt playing it.
    http://www.youtube.com/watch?v=yFU8XjWIkO4
    Watch for when I add the image to iWeb. In finder it's small_001.jpg but after adding it to iWeb it's thumbnail...

  • HT2470 My finder does not have the option to search for everything, only file names.

    Is there a place I have to change settings?

    "Add folder ..." is in the File menu, but first (if you're using iTunes versions 11.0.x) you might need to bring up the menu bar to see the File menu.
    If you're using 11.0.x, click on the wee boxy icon up in the top-left corner of your iTunes to see the "Show Menu Bar" control, as per the following screenshot:

  • Script to find OU name and object name in AD

    Hi , can any one help me on this, I need a script to find OU name along with object name in entire domain.
    Regards, Triyambak

    Hi Triyambak,
    As DexterPOSH mentioned, Get-ADObject can be used here.
    To list all OUs and the relevant objects of each OU in domain, please try the script below:
    Import-Module ActiveDirectory
    Get-ADOrganizationalUnit -Filter *|foreach{
    Get-ADObject -SearchBase $_.DistinguishedName -Filter *}
    If you have any feedback on our support, please click here.
    Best Regards,
    Anna
    TechNet Community Support

  • Add file name script not working in CS3

    I have this wonderful script (written by Brian Price) back in 2004 for PS7 that adds the file name to an image ( I use it for adding file names to small images to be used in a slideshow). It works great ion Photoshop CS, but when I try to use it as part of a batch action in CS3 it stalls on line 9. OIt works fine when run on just one image in CS3 . . . it just stalls when run as part of a batch action!
    Any help GREATLY appreciated!
    Many Thanks,
    Peter Thompson
    [email protected]
    www.photohawaii.com
    Here's the script:
    // this script is a variation of the script addTimeStamp.js that is installed with PS7
    //Copyright 2002-2003. Adobe Systems, Incorporated. All rights reserved.
    //All amendments Copyright Brian Price 2004 ([email protected])
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PERCENT;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = "";
    // Set font size in Points
    myTextRef.size = 30;
    //Set font - use GetFontName.js to get exact name
    myTextRef.font = "ComicSansMS";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 255;
    newColor.rgb.green = 255;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 5, 94);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

    I have this wonderful script (written by Brian Price) back in 2004 for PS7 that adds the file name to an image ( I use it for adding file names to small images to be used in a slideshow). It works great ion Photoshop CS, but when I try to use it as part of a batch action in CS3 it stalls on line 9. OIt works fine when run on just one image in CS3 . . . it just stalls when run as part of a batch action!
    Any help GREATLY appreciated!
    Many Thanks,
    Peter Thompson
    [email protected]
    www.photohawaii.com
    Here's the script:
    // this script is a variation of the script addTimeStamp.js that is installed with PS7
    //Copyright 2002-2003. Adobe Systems, Incorporated. All rights reserved.
    //All amendments Copyright Brian Price 2004 ([email protected])
    //Check if a document is open
    if ( documents.length > 0 )
    var originalRulerUnits = preferences.rulerUnits;
    preferences.rulerUnits = Units.PERCENT;
    try
    var docRef = activeDocument;
    // Create a text layer at the front
    var myLayerRef = docRef.artLayers.add();
    myLayerRef.kind = LayerKind.TEXT;
    myLayerRef.name = "Filename";
    var myTextRef = myLayerRef.textItem;
    //Set your parameters below this line
    //If you wish to show the file extension, change the n to y in the line below, if not use n.
    var ShowExtension = "n";
    // Insert any text to appear before the filename, such as your name and copyright info between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextBefore = "";
    // Insert any text to appear after the filename between the quotes.
    //If you do not want extra text, delete between the quotes (but leave the quotes in).
    var TextAfter = "";
    // Set font size in Points
    myTextRef.size = 30;
    //Set font - use GetFontName.js to get exact name
    myTextRef.font = "ComicSansMS";
    //Set text colour in RGB values
    var newColor = new SolidColor();
    newColor.rgb.red = 255;
    newColor.rgb.green = 255;
    newColor.rgb.blue = 0;
    myTextRef.color = newColor;
    // Set the position of the text - percentages from left first, then from top.
    myTextRef.position = new Array( 5, 94);
    // Set the Blend Mode of the Text Layer. The name must be in CAPITALS - ie change NORMAL to DIFFERENCE.
    myLayerRef.blendMode = BlendMode.NORMAL;
    // select opacity in percentage
    myLayerRef.opacity = 100;
    // The following code strips the extension and writes tha text layer. fname = file name only
    di=(docRef.name).indexOf(".");
    fname = (docRef.name).substr(0, di);
    //use extension if set
    if ( ShowExtension == "y" )
    fname = docRef.name
    myTextRef.contents = TextBefore + " " + fname + " " + TextAfter;
    catch( e )
    // An error occurred. Restore ruler units, then propagate the error back
    // to the user
    preferences.rulerUnits = originalRulerUnits;
    throw e;
    // Everything went Ok. Restore ruler units
    preferences.rulerUnits = originalRulerUnits;
    else
    alert( "You must have a document open to add the filename!" );

  • Obscure file name script advice

    I have a CD full of images created on OS/X with file names like
    R 519 (S 64).jpg
    I have a list of these file names and the names to which I need to change.
    In a sh srcipt I tried all of these variations
    mv 'R 519 (S 64).jpg' x
    mv "R 519 (S 64).jpg" x
    mv "R\ 519\ \(S 64\).jpg" x
    The files show normally in Finder but there is thousands of them and I would like to do it in batch.
    Could you please suggest a workable solution?

    This thread is very difficult to follow (I'm not a native English speaker).
    First of all, is the problem "Solved"? It seems your "problem" has changed a few times. Exactly what is you problem?
    I have a CD full of ....
    You can't rename files on CD (it's read only). I assume you have copied them to your hard drive.
    mv 'R 519 (S 64).jpg' x
    mv "R 519 (S 64).jpg" x
    mv "R 519 (S 64).jpg" x
    None of them works.
    Very strange. As Mark writes, the first one (single quote) should work. The second one (double quote) should also work. What kind of error do you get?
    the issue is renaming files whose names are in a text source file to arbitrary names in the same source file, like in:
    oldname1 newnameI
    som other name yet another new name
    Is this your (current) problem?
    If both oldname and newname contain spaces, then it is obviously impossible to figure out where oldname ends and newname starts. If it is guaranteed that *the newname does not contain any space*, then your task can be easily done by a simple shell script, for example
    #!/bin/sh
    while read -a line
    do
    n=${#line[*]} # number of words on this line
    oldname="${line[*]: 0: $n - 1}"
    newname="${line[$n - 1]}"
    echo 'rename "'$oldname'" to "'$newname'"'
    # mv "$oldname" "$newname"
    done < thelist
    Here "thelist" is the name of the file containing the list of "oldname newname" pair (a pair in each line). The "mv" command is commented out since it is rather dangerous. If you are satisfied with the output of echo, then uncomment the mv command.
    If I correctly understood (or guessed) your problem, then this should solve it. But you write
    The problem is in matching the names in left column with the names in OS/X file system
    What do you mean by "matching the names"? You also write
    I solved now as a bypass by obtaining the "real" file name through find, ...
    What do you mean by "real file name"? You mean "R 519 (S 64).jpg" is not a real name? I feel I'm still missing your "real" problem.

Maybe you are looking for