Script to renumber links in random order

I have chapter 1 page with 50 small photos in a very orthodox and symmetric grid that I should repeat in a different random order for other chapters.
Links have a numbered logical syntax like:
pict1.tif
pict2.tif
etc.
For the chapter 2, the idea is repeat the first one 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 will have a second folder:
picture 1.tif is now, for example, pict45.tif
picture2.tif.is now, for example, pict13.tif
etc.
IF I relink a copy of chapter 1 to this second folder perhaps the idea could be solved.

Jarek, hi.
It works when it is only ONE picture by page.
But, with many pictures in the page, as in the example, the script is dead.
(no error at all)
I have six pages with the same grid of pictures repeated in a file.
The idea is that in p. 2, 3, etc, the script alters the order in random to have different positions.
Tried different combinations but were useless.
Thanks.
PD. The screenshots show the script working with single images.

Similar Messages

  • ITunes sorts audiobook chapters in a random order how do I correct this?

    I own a copy of Arkange Complete Shakespeare, I have copied them onto my hard drive and tried to import them into iTunes.  No matter what I do, each track appears in a random order.  I've numbered the tracks like this:
    What I Want ...
    Track #    Name
    41 of 42   30.41 Antony and Cleopatra - Act 5 Scene 1
    42 of 42   30.42 Antony and Cleopatra - Act 5 Scene 2
    01 of 29   31.01 Coriolanus Act 1 - Scene 1
    02 of 29   31.02 Coriolanus Act 1 - Scene 2 ...
    What I get ...
    Track #    Name
    27 of 42   30.27 Antony and Cleopatra - Act 4 Scene 2
    07 of 24   20.07 As You Like It - Act 2 - Scene 4
    24 of 24   20.24 As You Like It - Epilogue
    01 of 29   31.01 Coriolanus Act 1 - Scene 1
    10 of 29   31.10 Coriolanus Act 1 - Scene 10...
    No matter how I try to sort they do not appear in order.  If I manually move each track one at a time into a playlist in the order I wish to listen to it, it will still change the order within the playlist as I make it matching the random order.  For example, if I add Coriolanus Act 1 - Scene 1 first and I then add Coriolanus Act 1 - Scene 2 second when I get to Scene 10 and add it after Scene 9 it will jump from where I put it to the spot imediately after Scene 1 as you see above.  I have tried renumbering the tracks so that each play, act and scene runs in chronological order, but it will still sort it wrong in iTunes.  Is there some hidden metric that I need to change to correct the order?  I have noted that although the sorting is random as I add them to iTunes the random order is the same each time.
    I do not have this sorting order problem in any other audio programs on my PC, but those other audio programs do not synch with my iPod

    See my previous post on Grouping Tracks Into Albums, in particular the topics Use an album friendly view and Tracks out of sequence.
    When you say the songs are listed alphabetically is this when looking at the iPod while connected to iTunes, in the iPods Cover Flow, Album & Artist Menus or within your playlists. If a playlist is showing up in the wrong order, arrange it iTunes the way you want, then right/option-click on the playlist title and click on Copy To Play Order.
    tt2

  • Random order by in SQL!

    11g
    Hi There,
      I had posted this query in the Application express forum, but I guess it really should have been posted in this forum, since its more of a sql question. Apologies if this is against the forum rules.
      We have a pie chart in Application Express which has select like
    select null, '0-10' Days , count(*) from table
    union
    select null, '11-20' Days, count(*) from table
    union
    select null, '21-30' Days, count(*) from table
    union
    select null, '>30' Days, count(*) from table
    The 3d pie chart was showing the slices is the correct order 0-10, 11-20, 21-30, >30 but now shows it in random order.
    Unfortunately, the charts in Apex have a restriction as far as the select statement is concerned, it should just have three values in the select statement, the first is a link (can be null), the second can be any column_name or description and the third a value like count, sum etc. Now, the above query is to get the count of sales in the mentioned number of days and so what is happening is that it is taking the values as character sorting and I think randomly sorting in the apex chart. Now, this works fine in SQL! So was wondering if anyone has any suggestions on how to maybe force the sorting on the second column (0-10, 11-20 etc). If I take those values as 010, 1120, 2130 3000, something like that(basically a number) it seems to work fine, but then those show up as labels on the chart which is not correct.
    Any suggestions on how to get the order by working. I suspect since the Days column in the select is a Character column this issue is occurring, however, with the restrictions in the number of select items we can have in the Apex charts, was wondering how do you get the order by working?
    Thanks,
    Ryan

    you would have to add an explicit order column that maps the string to its position in the result: that could be an id:
    group_name|group_id
    > 60      | 4
    11-30     | 2
    0-10      | 1
    31-60     | 3
    Regards
    Martin
    P.S.: and you could add the information via: case when group_name = ... then 1 end group_id

  • Random order for slide show?

    I have a lot of pictures in an album that I would like put in random order for a slide show. I want to burn that to a dvd to play at our day care centers (pics of the kids throughout the summer). is there any way to do this other than dragging and dropping the pictures manually? that takes a lot of time.

    OK. Well here's a helpful answer. Someone's already written a quick Applescript for adding random numbers to every file in a folder. I added a little bit to the beginning and the end to let you be able to just drag and drop the folder onto the file, but give full credit to the poster
    Steps:
    (1) Open the Applescript Editor:
    Finder->Applications->Apple Script->Script Editor.app
    (2) In a new Script copy and paste the following text:
    --start copying
    on open the_Droppings
    tell application "Finder"
    set separator to ("_") as text
    set source to the_Droppings as alias
    set destination to make new folder at source with properties {name:"Shuffled"}
    set shuffle_pool to duplicate files of source to destination
    set shuffle_count to count shuffle_pool
    set duplicates to {}
    repeat with shuffle_file in shuffle_pool
    repeat
    set an_item to random number from 1 to shuffle_count
    if an_item is not in duplicates then exit repeat
    end repeat
    shuffle_file as alias
    set name of result to an_item & separator & name of result as string
    set end of duplicates to an_item
    end repeat
    end tell
    end open
    -- stop pasting here
    (3) File->Save As
    (4) Type in a name for the file and IMPORTANT save it as an application.
    (5) Place all the images that you want to randomize into any folder. (In iPhoto6: File->Export from an album or; in iPhoto5: Share->Export)
    (6) Drag the folder with your images onto the little application that you saved from the Script Editor
    (7) The Script will create a new folder inside whatever folder you dropped on it called "Shuffled".
    (8) Now if you do an Edit->Add Slideshow in iDVD you can just drag the contents of the Shuffled folder to iDVD and you're done! It'll make a DVD in seconds! Now if only you could set the time to more than 10 seconds!
    ALL CREDIT TO: http://forums.macosxhints.com/showthread.php?t=46359
    and
    http://macscripter.net/articles/4670_10_0C/

  • Batch Rename---in Random Order

    Is it possible to batch rename a set of files in a random order? 
    Making a slideshow of a number of events, but I don't want them in the order shot.  I can manually rename and move them, or I could sort by some other order than by name or date, such as file size, I guess, but those options haven't randomized the collection as well as I would like.
    Just askin'...
    Thanks in advance.

    I’m not great with Scripts, but this might work:
    // adds random five digits numbers at the beginning of jpgs’ filenames in a folder;
    // use it at your own risk;
    var theFolder = Folder.selectDialog ("select folder that contains the files to be renamed");
    // for renaming other files than jpgs change the term in the brackets accordingly;
    var theFiles = theFolder.getFiles ("*.jpg");
    for (var m = 0; m < theFiles.length; m++) {
    var theRandomNumber = String(Math.random()).slice(3,8);
    File(theFiles[m]).rename(theRandomNumber + "_" + (theFiles[m]).name)
    One can copy the text into a new file in ExtendScript Toolkit (which should be part of Photoshop’s installation) and start running it by hitting the play-button or save it as a jsx-file into Photoshop’s Presets – Scripts; but it really doesn’t do anything within Photoshop, so it may be better not stored there.
    Anyway it’s probably be best to run it only on a copy of a folder, because getting the numbers back off later on might be bothersome.

  • Why restored windows after crash is with random order?

    I use new windows for grouping taks and tabs in each taks. If browser crash then after restoring windows is in random order.

    fractur wrote:
    Why do you doubt that a particular driver may be causing crashes? This is not an unusual thing. Do you have any evidence or reasons for dismissing this (e.g. Apple's touchpad drivers are user-mode)?
    Regarding the issue, I am experiencing the same problem. After upgrading the trackpad driver I started getting BSODs and other odd behavior.
    Yes, it's an Apple driver issue, as are some of the audio problems Windows is having. The audio noise/corruption is being caused by Apple's wireless driver. Some users are reporting good results by replacing Apple's wireless driver with a downloaded Windows broadcom driver. Sorry I don't have a link but it's been posted on this forum.
    I believe the OP mentioned several applications were upgraded.
    "boot camp, track pad driver, bonjour and iTune"
    pancenter-

  • Is there is a way to have a link from purchase order to cost center report.

    Is there is a way to have a link from purchase order to cost center report.
    I am meaning kind of:
    Standard way to customized this link?
    or
    User exit to have this link in place
    or
    Any other solution
    Thanks

    For me it does not make any sense from going from PO to cost center report.
    However, if you want to see the purchase order cost incurred with a cost center, execute KSB1 report. Within the layout, bring "Purchasing Document" field, where you can see the purchase order number in cost center line item report.

  • HOW DO I KEEP AN ARRAYLIST IN RANDOM ORDER AFTER EXITING THE SUB ROUTINE CONTAINING IT

    PLEASE HELP!I am trying to go from VB4 which I loved to VB2010 which I find somewhat more challenging. I’ve searched the web for help and have adapted the following to my project. This code does
    rotate randomly through every card in the deck and displays unique cards until all have been drawn. BUT I want to draw one card
    only from the first “hat” of Boy’s names; then draw the second card from the second “hat” of Girl’s names and repeat this process until all cards in both decks have been drawn. How do I get the TextBox (OR any
    MsgBox) to display JUST ONE unique random card at a time so I can exit that deck and go to the next deck?
    On my form, I have two TextBoxes (to display the names (as drawn), two buttons (to re-load each deck once exhausted) and one command (&End)control (to end the process). I created two ArraysLists
    (to hold the Boys names and Girls names separately) and two ArrayLists to hold the cards for the random decks when created in code.
    I can
    NOT get this code to draw random UNIQUE names once I exit the deck. I have tried to ReDim the deck; randomly pull a card from the second (temp) deck, etc
    NOTHING seems to work.
    WHY does my deck lose randomness once I exit it?
    How can I fix it? I don’t understand this. Below is the code for the "hat" with the 10 girl's names.
    Also, when I don't loop through all the cards, I usually get "An Out of Index exception was not handled" error. Hope someone can help me with this problem. It seems like this should
    be easy BUT I'm baffled. Thank you for any help.
    Imports System.Collections.Generic
    Public Class Form1
    Dim Count As Integer
    Dim Rcard As New ArrayList
    Dim Dcard As New ArrayList
    Dim NewRDeck As New ArrayList
    Dim NewDDeck As New ArrayList
    Dim temp_Rnum As Integer
    Dim temp_Dnum As Integer
    Dim MyRand As New Random()
    Public Sub Rcards_Click(sender As Object, e As System.EventArgs) Handles Rcards.Click
    While Rcard.Count > 0
    Dim temp_Rnum As Integer = Int(MyRand.Next(Rcard.Count))
    NewRDeck(temp_Rnum) = Rcard(temp_Rnum)
    Rem Check that the ArrayLists work correctly and display properly
    MsgBox(Rcard(temp_Rnum), , "New random card selected is: ")
    Console.WriteLine(Rcard(temp_Rnum))
    Rcard.Text = (Rcard(temp_Rnum))
    REM Now remove the Rcard with the random number generated so it can't be drawn again
    Rcard.RemoveAt(temp_Rnum)
    End While
    REM When all 10 cards have been picked, alert player to re-load deck if desired.
    MsgBox("No new cards left in deck; please Re-Load the cards. Thank you.")
    EndSub
    End Class

    Hi Acamar,
    Thank you for such a fast response. Sorry if my text wasn't clear. I'm really struggling with creating unique random elements in Collections in VB2010 and feel I understand ArrayLists better than some of the other Collection types.The code works perfectly
    and generates unique random cards until the original deck is exhausted. Then it prompts the user to re-load the original deck so it can be reused if needed. But I need to draw one card only and exit the deck. Then when I click on the TextBox again, I want
    that deck to be in the same random order - just minus any cards I have already drawn and thrown away.  Thanks again for your help.
    Here's the rest of the code for just the girl's "hats" of names, if it helps:
    Private Sub btnShuffleRCards_Click(sender
    As System.Object, e
    As System.EventArgs)
    Handles btnShuffleRCards.Click
    Dim j As
    Integer
    For j = 1 To 10
    NewRDeck.Add(j)
    Next j
    Randomize()
    REM Create original Deck with names for the girls.
    Rcard.Add("1 HELEN”)
    Rcard.Add("2 OLIVIA")
    Rcard.Add("3 <st1:city w:st="on"><st1:place w:st="on">ALICE</st1:place></st1:city>")
    Rcard.Add("4 VALERIE")
    Rcard.Add("5 DONNA")
    Rcard.Add("6 ZELDA")
    Rcard.Add("7 MARGARIE")
    Rcard.Add("8 <st1:city w:st="on"><st1:place w:st="on">NANCY</st1:place></st1:city>")
    Rcard.Add("9 WANDA")
    Rcard.Add("10 IRENE")
    End Sub

  • Sales order Link to Production order

    Hi
    Expert
    We dont have MRP and not MTO but it is MTS item categary maintain is NORM.
    In this i want to link the Sales order to Production Order.
    I tried Co08 but i got error like this sales order has no CO object
    Message no. CO323
    Is there is need to done customization in PP point of view or in CO point of viewplease tell me.
    Thanks & Regards
    Pert

    Not answered closing thread

  • Link between process order and sales order for planning strategy 52

    Hello,
    I investigate the possibility of a link between "sales order" and "planned order / process order" for the usage of planning strategy 52 (planning w/o final assembly, make to stock).
    I know, this is not conform to the basics of planning strategies (EITHER make to order OR make to stock) and I suspect it would be a modification. Of course we have the alternative "make to order" - strategy 50, but we do not want to use individual customer stocks.
    Is anybody there with similar customer requirements or project experiences?
    Thanks in advance,
    Joerg
    Message was edited by:
            Jörg Demtschuk

    Hi Jorg,
    To my understanding if you need hard pegging then in SAP only Individual requirement is possible.
    Or else you need to create a custom transactions/table to identify Sale order and when ever a process order is created by selecting the sale order record, the process order detials should also get updated against that.
    You need to take the help of ABAP expert for this,
    Regards,
    Prasobh
    Reward points if this was useful

  • HT1399 As I have added pocast shows to my itunes podcast list it is in a random order.  How do I alphabetize my list of podcasts.  Can I manually arrange them in an order of my choosing.  Thanks

    As I have added podcast subscriptions to my itunes podcast list on the far left menu window the list is in a random order.  How do I aphabetize the podcast list ?   Can I arrange them manually ?

    I have about 500 bookmarks ..   and they are arranged within 60 folders.  I would like to see them in chronological order as before, because now to find a bookmark is a hard task.
    thanks for your suggestion, anyway.

  • When I listen to music on Apple TV 2 my pictures from iPhoto come in, but always the same album (which I nevr asked for), always in random order and always in a different format. How can I control what is going on and choose the album myself.

    When I listen to music on Apple TV 2 my pictures from iPhoto come in aafter about ten minutes, but always the same album (which I never asked for), always in random order and always in a different format. How can I choose a different album myself and control the order and format?

    Thank you Winston for a helpful response and for reminding me of something which I found nearly a year ago and then lost (in my mind) because I did not use it. I am grateful for a correct answer but it still only achieves part of what I wanted.
    I can now choose my photos, decide how long they stay on screen and choose one of a variety of presentations. Two things I still can't do.
    One is to get it to play the photos in the chronological order in which I have carefully set them in an album; it still tends to be random and repetitive. The other is that I cannot get any of them them to saty on screen for more than about 20 seconds. I guess this is all due to the way Apple TV is constructed.
    But still thanks, nevertheless.
    Alec

  • How can I make a playlist play on my iPod in random order?

    I have made a playlist on my computer in iTunes. The songs are now in alphabetical order by song title, and when they play on my iPod they play in that same alphabetical order.
    Is there a way that I can make the songs in the playlist play in some other order? Preferably, just a random order?
    Or, is there a way that I can arrange them in iTunes that is not in alphabetical order and have them stay in that non-alphabetical order?
    Thanks!

    Just go to Settings, Shuffle, then turn it to Songs. The songs will stay in the same order in the playlist, but they'll switch it up.

  • Websites are not displaying all graphics. Amazon does not show any buttons/links to place orders. My Yahoo home page is not complete. What do I do besides going back to IE?

    Colors, icons, links, buttons for ordering on Amazon do not appear through Firefox, but do with IE. My Yahoo homepage is also missing a lot of graphics, pictures, etc. Text is all in blue rather than black

    Stan -
    Thanks again for the simple but valuable tip.
    I'm just going to repeat the relevant sections from my previous post with the screenshots this time:
    Below you'll see a snip of how my current folder structure appears. It's identical to yours, except there are no button files in the General Folder. Since you were kind enough to include a file name, I did a search on that specific one and it's nowhere to be found on my hard drive. Hmmm....
    I've seen others remark on how... "challenging".... Adobe's instructions can be sometime. I'll admit to having the same feeling when I was trying to download and install all the content files and the 7-zip stuff. Is the answer somehow that I screwed up that?  Note the 7-zip folder right above the Adobe folder. Here's a screen shot of that expanded folder contents:
    Does that look like you think it should? Have I not installed or extracted something correctly?
    Finally, the only other thing I can think of to give you as much info as you might need is to include a screenshot of where the "Functional Content" stuff got saved. Adobe's instructions about this (if I recall correctly) were that it did NOT have to be installed anywhere specific, but you then had to go into Encore (& Premiere) and through preferences point to this stuff, which I believe I did. But I don't see any button type files in these anyway.
    Other thoughts or advice?
    Thanks!

  • In downloading my Events from iPhoto on my Mac to my iPad Air, the Events arrive in the proper order but not showing the Key Photo.  At the same time, the Events arrive in iPhoto on the iPad in totally random order but showing the Key Photo.Why?

    In downloading my Events from iPhoto on my Mac to my Ipad Air, the Events arrive in Photos in the correct order but not showing the Key photo. At the same time, the Events arrive in iPhoto in a totally random order but with the Key phto showing. Why? of course and is there a way to shift the order in Iphoto and get a Key photo in Photos?

    HHi, thank you for the reply. I have checked my iPad and iPhone and neither has iCloud Photo Library (Beta) enabled. Turned off in both. Photostream is turned on.
    i tried to sort it out  by dragging all the photos to Events on the Mac and then deleting them from iCloud - (left hand side of iPhoto under the section 'Shared'). the photos now show up in Events. I did force quit but the issue remains. The message reads ' photos are bing imported to the library. Please wait for import to complete.'
    i can't empty iPhoto trash either. The message read "Delete error. Please wait for import to complete.'
    WHen I was moving the photos to the Events I always had a message about duplicates - to the effect that the photos already existed, did I want to import them? I clicked on Yes, import all duplicates. But when it showed the images - duplicates side by side - one showed the photo and the other was blank.
    I really don't know what to do! And I don't know how to handle my iOS devices. Is it to do with the large number of photos? Any help, advice appreciated.

Maybe you are looking for