Script to renumber the links in random order

I have Chapter 1 page with 50 small photos in a very Orthodox and symmetrical grid should I repeat in a different random order for other chapters.

Links have a logical syntax numbered like:

pict1. TIF

PICT2. TIF

etc.

For Chapter 2, the idea is to repeat the first but in a random order. Same photos, same layout, different order.

Perhaps a script could rename the links?

Thus, once the folder is duplicated, I'll have a second folder:

Photo 1. TIF is now, for example, pict45.tif

Picture2.tif.is now, for example, pict13.tif

etc.

IF I recreate a link to a copy of Chapter 1 of this second issue perhaps the idea could be resolved.

Jarek, salvation.

It works when it's only ONE image per page.

But, with lots of photos on the page, as in the example, the script is dead.

(no error at all)

I have six pages with the same grid of images repeated in a file.

The idea is that, at 2, 3, etc., the script changes the order randomly have different positions.

I have tried various combinations but were useless.

Thank you.

PD. The screenshots show the script works with simple images.

Tags: InDesign

Similar Questions

  • Girls need help with a script to repeat the link to another folder in indesign

    I REALLY hope you smart people can help me.

    We had servers which means that all of our Indesign documents now have a broken link. To manually "re-edit the link to the file" causes Indesign down :-(. And it takes forever I am hoping to find a script that can connect all the links in the doc to a new file structure.

    The name of the link (name of file) and the file structure remains the same; Just point to another server. The structure contains subfolders so the best way would be that the script can see subfolders as well, but otherwise I would gladly use a script that points of 6 subfolders at a time.

    Problem - I KNOW NOT ALL SCRIPTS and I'm a graphic designer so I can't create scripts :-(. I have already had success Googling a script to unlink everything in the document, but I don't know how to run the script. DO NOT to create them.

    ANY help in this forum? I have 6 designers waiting for me to fix this.

    Is there a script where I could just change the path and then he could repeat?

    We have iMac OSX Yosemite 10.10.4

    PLEASE HELP... :-)

    / Dina

    Try this... it is created by Vamitul

    main() {} function

    var doc = app.activeDocument;

    myLinks var = doc.links.everyItem () .getElements ();

    var linkObj = {};

    Create the initial object

    / * {linkObject

    [path] {missingNr,

    arrayOfMissingLinks}

    } */

    for (var i = 0; i)< mylinks.length;="" i++)="">

    If (myLinks [i] .status == LinkStatus.LINK_MISSING) {}

    var myPath = File(myLinks[i].filePath).path.toString ();

    If (linkObj [myPath] == undefined) {}

    linkObj [myPath] = {}

    missingNr: 1.

    missingLinks: [myLinks [i]],.

    newPath: "

    }

    } else {}

    linkObj [myPath] .missingNr ++;

    linkObj [myPath].missingLinks.push (myLinks [i] .getElements () [0]);

    }

    }

    }

    $.writeln (linkObj.toSource ());

    var myDialog = new window ("dialog", "link Chaser:', undefined");

    Panel1 = myDialog.add var ('panel', undefined, "double-click to select the new path '");

    Panel1. Align = ["fill",""];

    myList var = panel1.add ("listBox", undefined, "", {})

    columnWidths: [160, 160, 130],

    numberOfColumns: 3,.

    showHeaders: true,

    columnTitles: ['old road', 'New Path', 'Nr. missing links']

    });

    myList.size = [450, 200];

    myList.align = ["fill",""];

    for {(var missingPath in linkObj)

    with (myList.add ("item", missingPath)) {}

    Subitems [0] .text is linkObj [missingPath] .newPath;.

    Paragraphs [1] .text is linkObj [missingPath] .missingNr;.

    }

    }

    myList.onDoubleClick = function() {}

    var myNewPath = (new folder (app.activeDocument.filePath) .selectDlg ("Select New Folder") |. toString() ' ");

    myList.selection.subItems [0] .text = myNewPath;

    linkObj [myList.selection.text] .newPath = myNewPath;

    }

    myDialog.add ('button', {undefined, "Ok",

    name: 'ok '.

    });

    myDialog.add ("button", undefined, "Cancel", {})

    name: "Cancel".

    });

    If (myDialog.show () == 1) {}

    for (var i in linkObj) {}

    If (linkObj [i] .newPath! = ") {}

    var fixedNr = 0;

    Var links = linkObj [i] .missingLinks

    for (var j = 0; j)< links.length;="" j++)="">

    var queue = newFile (linkObj [i] .newPath + "/" + links [j] .name);

    If {(newFile.exists)

    fixedNr ++;

    Links [j] .relink (NewFile);

    }

    }

    Alert ("in the folder: \n" + linkObj [i] .newPath + '\n' +)

    'Fixed' fixedNr ' links of ' + linkObj [i] .missingNr + '\n ' +.

    "Please check");

    }

    }

    };

    }

    app.doScript ('main()', undefined, undefined, UndoModes.entireScript, "Chaser link");

  • Script to sort the table in ascending order

    Hello

    I am not able to find any manufacturer of chassis function to sort the table in ascending order with respect to column 1. Please, guide me how I can write the script extended chassis manufacturer to sort the table.

    Thanks and greetings

    Libson

    Here's how you can sort a table with ExtendScript:

    #target framemaker
    
    var doc = app.ActiveDoc;
    // Set a variable for the selected table.
    var tbl = doc.SelectedTbl;
    
    // Select the table.
    tbl.MakeTblSelection (Constants.FF_SELECT_WHOLE_TABLE);
    
    // Sort the table.
    CallClient ("TableSort", "row nocase 0 ascending -1 ascending -1 ascending");
    

    Here's the FDK Programmers Reference for TableSort settings information:

  • Help with a script to remove the link "Place and link" content

    Hello

    I need a script that will separate the content that has been placed in an indesign document by using the feature "place and link.

    I know I can manually go to the link Panel, select the linked content here and click 'remove link' in the Panel menu. However, I have about 200 indesign documents that are all full of content that has been 'placed and connected '. One I get a script to unlink content, I can add it to a batch routine to make the record of 200.

    Can anyone help please.

    See you soon

    Like this?

    app.activeDocument.links.everyItem () .unlink ();

  • [Req] script to update the links in Indesign using spotlight

    Hello

    I have a challenge, can someone help me please?

    I'm a graphic designer from Holland and I work with a lot of Indesign documents

    which links are missing because they are displaced, so that they are some share on our server.

    I have several scripts to connect the missing links, but they are slow,

    because they each directory and in each subdirectory. It takes some time.

    The apple search engine, Spot, is much faster.

    So I think that I have this great idea, I thought about the following:

    I select a missing link in the linkpanel in Indesign.

    Then I run the script.

    The path of the missing link is copied and ready to just the name of the file

    The name of the file is then copied to the Clipboard.

    The script then opens the dialog window to repeat the missing link.

    It the name of the image is pasted into the spotlight search engine.

    Here, the script stops.

    Click the correct file (if there is more choises) and recreate it a link is done.

    I think that this way of restoring links can be much faster.

    And you can also work with predefined smart windows (to limit results), for example:

    -a witch only shows jpg

    -a witch only shows tiff

    -a witch only shows pdf

    I know a very small little scripting, but this one I can't understand yet.

    Can someone give me help please?

    Best regards, Eric

    PS. I'm still working in CS4

    Although you have a solution and sorry for quitting yout ID should have tested more then once, it was a pretty old script and I just copy and paste...

    just rewritten my old script a little to run on ID CS OSX 10.7.4 5.5

    Should pass on missing links in the Active Document, use mdfind to search for files with simular names as name of missing link in the given directory, reveals possibly the file in the finder and shows / selects currMissingLink in ID-file. If 'ok' rebuild the missing link (without leaving ID ;-) I hope).

    global myFolder
    
    set tid to AppleScript's text item delimiters
    
    tell application "Adobe InDesign CS5.5"
        set currDoc to active document
        set theMissingLinks to every link of currDoc whose status is link missing
        if theMissingLinks is not {} then set myFolder to choose folder with prompt "Where to search for the missing links?" --select a mounted volume, folder ...
    
        repeat with missingLink from 1 to count of theMissingLinks
            set currMissingLink to item missingLink of theMissingLinks
            set currFileName to name of currMissingLink
            set theResultList to my mdFind(currFileName)
    
            if theResultList is not {} then
                repeat with i from 1 to count of theResultList
                    set theItem to (item i of theResultList)
    
                    set currDialog to display dialog theItem with title "Relink this file?" buttons {"OK", "Cancel", "Show in Finder first"}
                    if button returned of currDialog is "OK" then
                        try
                            relink currMissingLink to POSIX file theItem
                        on error e
                            display dialog e
                        end try
                    else if button returned of currDialog is "Show in Finder first" then
    show  currMissingLink --select the missing link in ID
                        my revealInFinder(theItem) --show the found file in finder
                        activate
                        set currDialog to display dialog theItem with title "Please switch to Finder to see the file. Relink the file shown in Finderwindow?" buttons {"OK", "Cancel", "Continue searching"}
                        if button returned of currDialog is "OK" then
                            try
                                relink currMissingLink to POSIX file theItem
                            on error e
                                display dialog e
                            end try
                        end if
                    end if
                end repeat
            end if
        end repeat
    
    end tell
    
    on mdFind(currFileName)
        set AppleScript's text item delimiters to return
        set PathToAllFiles to every text item of (do shell script "mdfind -onlyin '" & quoted form of POSIX path of myFolder & "'" & space & " -name '" & currFileName & "'")
    
        set PathToAllFiles to my cleanList(currFileName, PathToAllFiles)
    end mdFind
    
    set AppleScript's text item delimiters to tid
    
    on cleanList(fileName, listOfFilePaths)
        set myCleanList to {}
        set AppleScript's text item delimiters to "/"
        repeat with p from 1 to count of listOfFilePaths
            set aName to (text item -1 of (item p of listOfFilePaths))
            if aName is equal to fileName then set end of myCleanList to (item p of listOfFilePaths)
        end repeat
        return myCleanList
    end cleanList
    
    on revealInFinder(somePosixPath)
        tell application "Finder"
            set myAlias to (POSIX file somePosixPath) as alias
            activate
            reveal myAlias
        end tell
    end revealInFinder
    

    Hope it will work

    Hans-Gerd Classen

  • Menu questions: breaking the links at random

    In the last 5 months, I worked on a massive site that consists of more than 70 + pages. I use a menu grid Muse mega because my customers wanted a 100% width menu type drop-down. I have since upgraded Muse 2 - 3 times and am having nothing but problems with the menu. For example, if you go to the navalicompany.businesscatalyst.com site and try clicking on the industry in the main navigation that is not related. I have linked this page over and over again only to have Muse forget the link again. I can't tell you how many times I have to fire the menu. You can imagine 70 + pages multiplied the number of times I had to manually make corrections and it comes out in the hundreds, or even thousands of corrections. This laborious task is largely to the fact that my client wants as the header to stick on the top, so I need the item header and menu on each page (not master pages). Can you help me at all and I would like to know why the menu continues to forget it is link. I'm way late to launch this site and I'm getting tired of this question. Help, please! Thank you!

    Ryan

    Yes and Yes.

  • script to rename the layers in alphabetical order

    Hello world

    I have a name change script that works only on the numbers and I want to make it work for the letters too.

    What I want to achieve is to select a few layers-> load the script-> enter the desired name of the layer and brackets insert the letter of where to start. The script then iterates through the alphabet rename the layers and adding the letter from coresponding to the name and remove the brackets. For example, I select 4 layers, loading the script and when the guest comes on... Enter the name: test [C]. In the end, that I should have renamed layers testC testD, tests, testF

    Any help would be appreciated!

    Thank you

    So what you wanted, it is for renaming selected objects, no layers, right?

    Check this script, I took a different route, I added some comments, if you have problems with it, do not hesitate to ask

    // this script Renames selected Objects with a base name plus an incremental suffix
    // Carlos Canto // 07/03/2013;
    // http://forums.adobe.com/thread/1243774?tstart=0
    
    var doc = app.activeDocument;
    var sel = doc.selection;
    var rename = prompt("Enter the name and ONE character suffix (comma separated, no space):","test,A", "Increment Rename Selected Objects");
    if (rename!=null) {// quit if pressed Cancel
        var nameArray = rename.split(","); 
    
        var base = nameArray[0];
        var suffix = nameArray[1];
    
        var charCode = suffix.charCodeAt (); // convert the suffix character to Unicode
    
        if(sel.length>0){
            for(var z=0;z		   
  • How to raise an event when the user have clicked all the buttons (in random order)?

    Greetings,

    I want to trigger an event (frame 2 goto and stop) after all my 3 user buttons were clicked in no particular order.

    I have 3 buttons on the stage, image1. (instence names: MCBlue, MCRed, MCYellow)

    How can I write my code?

    Here's what I have, but it does not at all. I'm so confused.

    I thank very you much for your time.

    [code]:

    import flash.events.Event;
    import flash.events.MouseEvent; 
    
    stop();  
    
    MCRed.addEventListener(MouseEvent.CLICK,redReady);
    MCBlue.addEventListener(MouseEvent.CLICK,blueReady);
    MCYellow.addEventListener(MouseEvent.CLICK,yellowReady);
    
    function redReady(event:MouseEvent):void
    {
              MCRed.MouseEvent.CLICK();
    }
    
    function blueReady(event:MouseEvent):void
    {
              MCBlue.MouseEvent.CLICK();
    }
    
    
    function yellowReady(event:MouseEvent):void
    {
              MCBlue.MouseEvent.CLICK();
    }
    
    
    var buttons:Array = [redReady, blueReady, yellowReady];
    var sequence:Array = [];
    var correct:int;
    
    
    addEventListener(Event.ENTER_FRAME, gotoFrame);
    
    
    function gotoFrame(e:MouseEvent):void {
              if (buttons.indexOf(e.target) == sequence[correct]){
                        gotoAndStop(2);
              }
    }
    
    

    If the buttons are movieclip symbols, then a way to solve it would be to set a property of each button to be true, when everyone gets clicked and then have a function that you call who checks this property for all buttons.  When all the true test is when you switch to the 2 structure.  Something like...

    import flash.events.Event;
    import flash.events.MouseEvent;
    
    stop();  
    
    MCRed.addEventListener(MouseEvent.CLICK,redReady);
    MCBlue.addEventListener(MouseEvent.CLICK,blueReady);
    MCYellow.addEventListener(MouseEvent.CLICK,yellowReady);
    
    MCRed.clicked = false;
    MCBlue.clicked = false;
    MCYellow.clicked = false;
    
    function redReady(event:MouseEvent):void
    {
              MCRed.clicked = true;
              gotoFrame();
    
    }
    
    function blueReady(event:MouseEvent):void
    {
              MCBlue.clicked = true;
              gotoFrame();
    }
    
    function yellowReady(event:MouseEvent):void
    {
              MCYellow.clicked = true;
              gotoFrame();
    }
    
    function gotoFrame():void {
              if(MCRed.clicked && MCBlue.clicked && MCYellow.clicked){
                        gotoAndStop(2);
              }
    }
    
  • Impossible to hide the link refresh according to "without result" in the 10.1.3.2.1 BISE1 version

    Hi experts,
    I use Business Intelligence Standard Edition One 10.1.3.2.1 version.
    I can't hide the link refresh in order No. result, I checked all the blogs and forums related to this issue. They asked to use the following script but it does not work for me in my BI version, there is always a link update.

    < script type = "text/javascript" >
    <!--
    function removeRefresh() {}
    cols = document.getElementsByTagName('td');
    for (x = 0; x < cols.length; x ++) {}
    If (cols [x] .className == "ResultLinksCell" & & cols [x].innerHTML.indexOf ('Refresh')! = - 1).
    passes [x] .innerHTML = ";
    }}
    Window.OnLoad = removeRefresh;
    ->
    < /script >

    Please provide me with an exact solution which following my version of script.

    Thank you and best regards,
    REDA

    Go to the complex layout-> other views-> No. results
    Add the code to the text below

    It works without any problem, else something wrong with your steps.

    I appreciate if you mark as correct

  • I have created a slideshow using Photos app. I wish that the images will appear in a random order (as they can in Power Point). I see no way to do it in the settings. Any advice?

    I have created a slideshow using Photos app. I wish that the images will appear randomly (as they can in Power Point), but I don't see where in the settings that allows this. Any thoughts?

    There is no option in Photos for MAc that allows you to randomly pull a slide show.

    You can create an album and have the album as an instant slide show in a random order using an Apple Script.

    See this link: Script: Shuffle Photos for an instant slide show in a random order

  • In our site web the kind of product order under our categories are random with Firefox, but IE, Chrome is fine, any ideas?

    The sort order of products under our categories on our website is random with Firefox, but the categories of products are in the correct order with IE, Chrome, etc.. This incorrect order occurs on different computers, e.g. Firefox, Windows 7, XP, etc. and not is not compliant. To make matters worse, sometimes it is random with Firefox and return then to be sorted correctly, but IE, Chrome, etc. are always in the correct order.

    I get the blue beauty first when I specify 'Default' sort order and blue Gigantea first when I specify 'Low price' sort order. This seems to be implemented using a cookie so that if I reload the page, the order is not reset to the default value.

    Edit: However, if I close the tab and open the link again, it reverts to the default.

  • Script to move the playhead randomly to executives?

    Is it possible to have a script that sends the playhead to specific images at random, wait about 8 seconds then go?

    For example, frames 1-20 will have an image on each image. I want the playhead to land on these images in a different order and keep a loop.

    Thank you

    I did not code it if you return to section 1, code it so that when you return to frame 1, you launch a setInterval another... you want only a job.  If you place the following code in frame 1 it will take care of it, leaving a setInterval be activated...

    Stop();

    var intervalID; intervalID is undefined here because there is nothing assigned

    if(!intervalID) {/ / will only when intervalID is undefined}
    intervalID = setInterval (moveToFrame, 3000); defines intervalID
    }

    function moveToFrame() {}
    gotoAndStop (Math.floor (Math.random () * 4) + 1);
    }

  • Some how my email was requested to be removed and the link to verify that I DON'T want be removed takes me to some site randomly, please help.

    Some how my email was requested to be removed and the link to verify that I DON'T want be removed takes me to some site randomly, please help.

    Your post is a little vague, but I fear that you may have received a phishing e-mail. Please tell us all about this request but do not follow any links or give any information at this stage.

  • How to set the digital image to display photos in random order on a picture frame digital df730

    My digital photo frame displays photos in sequential order. How can I change in a random order?

    I solved the problem. Photo selection and then pressing the key on human beings to control hand symbol to the top of the configuration menu.

    Then, I could choose slide show with shuffle. Unfortunately the user guide does not explain this, or online information.

  • Sidebar gadgets are in random order each time I restart the application from the sidebar or I restart the computer.

    For some reason, whenever I restart the computer or I close the application of the sidebar and re - open in the start menu, my gadgets are in random order.

    I saw another thread for this on Microsoft Answers Social, but his problem was just after installation of SP2. I had SP2 for a long time and recently began to experience this.

    A moderator of Microsoft support proposed making sure that Java and Flash have been fully installed and implemented to date. I have both.

    However, due to a recent achievement in the platform of Adobe Flash (the one that allows the remote control, discovered last week), Adobe has proposed the Flash upgrade to the release candidate 7 (10.1) version. What I did. Could that be the cause? Hope not. If this is the case, then I will be happy to downshift until a solution has been found. However, the Java platform is perfectly updated and operational. And it's the 6.20 version, which is the latest public version.

    Well, I reformatted my hard drive and all restore factory settings.

    Everything worked fine... Until I installed again my Adobe CS5 Master Collection.

    So I started uninstalling the components one by one to see what worked...

    It turns out that Adobe Acrobat 9 Pro Extended (or rather the 64-bit extension him) makes the sidebar go haywire.

    Uninstalled Acrobat 9 and no problems yet. Restarted several times to make sure.

    I hope that one day I'll find an update to Acrobat who sets. Maybe I'll go post in the Adobe forums for that one.

    Whatever it is, no biggie for me - I barely use Acrobat.

Maybe you are looking for

  • Scam or e-mail from Apple?

    I just got an email from apple, which appears as appstoreonline.co.uk, indicating that I bought an element, Minecraft Pocket Edition at a cost of £1.17 to a time where I was and not on my iPad. He invites me to click on a link to get a refund if I di

  • How to check a page with a gray triangle?

    Often I play a game online through FaceBook, where you can watch videos, etc. to get rewards for you help in the game. Everything was fine until I recently updated my Linux Mint to 17.1 and who came with FireFox 33.0. Now when I start the game throug

  • Satellite L300-190 - Wireless does not work in Ubuntu 8.10

    Hello I recently bought this Toshiba Satellite L300-190 (PSLB8E-014008N5) of the machine.First of all, I tried to install Ubuntu 7.x, but which failed due to a problem of graphics card. So I try the new version of Ubuntu 8.10, everything works fine,

  • Overheating my Satellite A665 - 12 M

    Well,. As the title says, my Satellite A665 is overheating. I bought it some time ago, but it has done from the beginning. I wasn't expecting to buy a EUR 2000, - portable and have these issues. I have only these questions when I went and all CPUS ar

  • EA3500 unable to connect USB printer

    I'm unable to connect to a printer using the USB port on my new Linksys EA3500 router. I followed the instructions here: Support Page , but my version of Cisco Connect not not the option "connect a USB printer» I'm on a macbook pro OSX 10.7.4 and my