Script for slideshow of images in folder of playing now track in iTunes?

Hi
I am wondering how easy it would be to write a script that would create a slideshow of images in the album folder of the track currently playing in iTunes. Because iTunes doesn't support the display of multiple artwork images I am looking for another method (I have a lot of albums with multiple images).
I would like to be able to view the images fullscreen on a secondary monitor whilst still having the ability to use my main monitor for other purposes (i.e. the main monitor wouldn't be blacked out).
In addition to this the following features would be nice, but not essential:
1. the script to extract the length of the song playing and the number of images in the folder and from this work out how long to display one image so that each image is displayed once for an equal length of time.
2. to have some text with info on song - artist - album etc. below the images in white text on black background.
3. transitions between the slides
Would such a script be feasible, even if just to cover the basics?
Thanks
Nick

This is what I have quickly whipped up. I did a little testing and found iPhoto is popping up a bunch of dialogs on importing duplicate images on the import. Perhaps there is a "synchronize" command I am missing or something ("import without force copy" doesn't seem to help) but the rest of the script works. I haven't worked in the looping for monitoring song change yet either. May be prettier with another stay open script which calls this one anyways.
I haven't done much with plist editing either. You can run the first set safely so long as iPhoto is closed, but changing length of slide while it is open through the plist is going to be quite risque. I can't find how to do it without plist or UI though. Anyways take a look and any outside help would be appreciated as well.
try
tell application "iTunes"
set currentAlbum to album of current track as text
set currentArtist to artist of current track as text
--set trackLength to time of current track --need to convert from 'mm:ss' to 'seconds' i believe
end tell
on error
display dialog "Try playing some music first." with buttons ("Cancel")
end try
set iPhotoAlbum to (currentArtist & "." & currentAlbum) as text
--set pathToMusic to "/Volumes/music 1/" & currentArtist & "/" & currentAlbum & "/"
(*SET UP IPHOTO DEFAULTS - dangerous to edit plist with iphoto open *)
--do shell script "defaults write com.apple.iPhoto SlideShowAutoPanAndZoom -string YES"
--do shell script "defaults write com.apple.iPhoto LoopSlides -string YES"
--do shell script "defaults write com.apple.iPhoto EnableBackgroundMusic -string NO"
(*SET UP DEFAULT SLIDE LENGTH - will need to move this down after importing*)
--tell application "iPhoto" to set picCount to count of items in album currentAlbum
--set slideLength to ((trackLength - 5) / picCount)
--do shell script "defaults write com.apple.iPhoto SlideDuration -int " &slideLength
tell application "iPhoto"
if not (exists (album iPhotoAlbum)) then new album name iPhotoAlbum
import from pathToMusic to album iPhotoAlbum
delay 5 --allowance for import as needed
start slideshow using album iPhotoAlbum
end tell

Similar Messages

  • Script for finding characters in a folder or file name

    I need some help on writing a script that will search thru users folders and files and replace characters in the names with a different character. Our users folders go back to when the users used OS 9 and they used / \ * ? in the file and folder names, I want to write a script that will replace these characters with an _ . Obviously I will need to be logged in as the root user.
    The server is OS 10.3.9
    Thanks,
    Jeff
      Mac OS X (10.3.9)  

    Hi Roger,
       There's a flaw in your regular expression and that is the absence of alternation. You want to replace any one of these characters with an underscore. That can be accomplished by putting the characters in a character class. Since the class matches a single character, you'll get an underscore for each.
       Your regular expression only matches a group of all of the characters, side-by-side, in the order you typed them and then it replaces the entire group with a single underscore.
       Oh, there's one other possible flaw. I think that the find utility creates lists of files in relatively large groups and then acts on them. If you change a directory that contains a file you want to change, it's possible that the change to the directory will not be reflected in the path to the file, causing a "file not found" error. A depth first search and acting only on the basename would eliminate that possibility.
    Hi Jeff,
       I recommend a command like the following:
    find -d /Users -regex ".[\:*?]." -exec echo 'mv "{}" "$(dirname "{}")"/"$(basename "{}" | sed '\''s/[\\:*?]/_/g'\'' )"' \; | sh
    That uses the same character class in the -regex option of the find command. That way, nothing will be invoked unless necessary. The method of creating the text of a complex command and using the -exec switch to echo that into a shell is an old trick from O'Reilly's UNIX Power Tools.
       I substituted a colon for a forward slash. As the path separator, the forward slash isn't a valid filename character on a UNIX system. However, old Apple tools, including the Finder, still use a colon as the path separator. Therefore the system presents the allowable character as a forward slash to Apple tools and a colon to UNIX tools. Thus using the colon in the command above will have the effect you want on files that the Finder says has a forward slash in the name.
    Gary
    ~~~~
       James Joyce -- an essentially private man who wished his total
       indifference to public notice to be universally recognized.
             -- Tom Stoppard

  • Script for placing an image in its own paragraph (for eBooks, etc)

    This is for flowing text formats.
    With the cursor placed at the beginning of the paragraph, the script needs to:
    - paste an image from the clipboard at that insertion point
    - place a break paragraph return (to put the image in its own paragraph)
    - apply a paragraph style to the image (zero leading)
    - add an XML tag "image"
    Is this doable?

    Absolutely.
    - After you did a previous manual "copy", from within InDesign or in just about any other program, app.paste() will do a regular paste operation on your current cursor position.
    - use app.selection[0].insertionPoints[-1].contents = "\r" to 'insert' a paragraph return before your current cursor position.
    - use app.selection[0].paragraphs.previousItem(app.selection[0].paragraphs[0]) to set properties of the paragraph before the one your cursor is in (as you may already know, scripting usually does not move the cursor around).
    - so, since 'allGraphics' is the property that holds images for paragraphs, app.selection[0].paragraphs.previousItem(app.selection[0].paragraphs[0]).allGraphics[0] targets 'the first graphic in the previous paragraph that you are currently in', and you can set its properties in turn to anything you'd like.
    As for the finishing touch, setting the XML tag of an image, I don't know how to do that ... there doesn't seem to be a 'tag' method for graphics.

  • For all of you who can't play Purchased tunes from iTunes...

    I spoke to AppleCare and solved the problem.
    You need to Restore your iPod software. It works! If you need help let me know or someone else please post. Gotta run out for a bit...

    First goto control panel>add & Remove in windows and
    try to remove iTUnes AND quicktime from there. If you
    can not remove them from there go here and roll down
    to "Clean up iTunes installer files on the computer"
    http://docs.info.apple.com/article.html?artnum=93976
    Now Open Microsoft Internet Explorer, goto
    Tools.Windows Update and run it to make sure your
    windows has all its updates. You may also want to
    goto the PC makers site (Like Dell, HP or whatever
    brand of PC you have) and look for updates for your
    model,
    After you have updated your system, disable any
    antivirus programs and security programs, goto
    apple.com and download the latest version of iTUnes
    for windows and install it.
    pac_80. Thanks for the assistance. It has partly solved the problem in that my daughter can now hear her tunes through the computer speakers,but still they won't transfer to her actual i-pod. We've tried all the usual 'update i-pod' etc.,but still no joy ! Can you help please ?

  • Script to rotate an image in InDesign CS4 from an Excel Spreadsheet

    Hi all,
    Is there a script for InDesign CS4 that reads degrees from an excel spreadsheet and then rotates a specific image by the same amount of degrees that was written in this excel spreadsheet? I would like to create a column in Excel full of rotation degrees and then go to InDesign, run the script for a specific image and the image will rotate automatically.
    If there isn't a script like that already around, can you let me know if it is possible to be done and also if it is possible, can you help me create one please?
    Thank you in advance for your help.
    Lucas

    a script to rotate images... only one at a time and marijan tompa had the answer for that: http://forums.adobe.com/message/2998073
    as for referencing an excel file or txt/csv, i don't know, but perhaps other posters could assist.
    colly

  • Applescript for selecting an image in PDF file.

    Hi All,
    I'm looking for a apple or java script for selecting an image in PDF file. Can anyone help?

    Selecting an image? For what purpose?

  • Problems with Freehand Illustrator CS4 script for Macs

    A couple of us just downloaded the new Freehand to Illustrator CS4 script for Macs that was released on 5/17/10. Sometimes it works okay, but more often than not we get errors like 'ERROR: 1, Access is denied'. If we instead just open the Freehand file, the file comes in fine. What have been other people's experiences using this new script?
    Mac OS X 10.5.5

    Is the problem there only at the time of conversion or even the FH files are not opening after running the script
    Here is what I have done and may be you can follow the exact steps :
    1) Create a folder FH on Desktop and paste only the FH files in the folder( My folder does not contain any other file apart from FH files)
    2) Create a Folder AI  on Desktop and keep it empty
    3) File-> Scripts-> FreehandToAI
    4) Select the source folder( FH)
    5) Now select the destination folder(AI)
    It gives the message after conversion "N freehand files are converted to AI".

  • What is "run pregrade script for apple devices"?

    What  is  "Run pregade script for Apple Device mean. I am tryong to down load Itunes 10.5 on my 2005 Mac. What is the problem?

    Are you sure that's how the error message is phrased? Are you sure it doesn't actually say "run preupgrade script for Apple Mobile Device Support"? (note in particular the difference between "preupgrade" and "pregrade" as you have phrased it)
    If it really does instead say "preupgrade", not "pregrade", here are a couple of threads with suggestions:
    https://discussions.apple.com/thread/3373568?start=0&tstart=0
    https://discussions.apple.com/thread/2515630?start=0&tstart=0
    If those don't help, this support article may:
    http://support.apple.com/kb/HT1747
    Regards.

  • Creating a script for inserting images

    I am new to the scripting concept, so please forgive me when I use incorrect terminology.
    I would like to create a script that will automatically place images in my InCopy document. Basically I want to type the names of image files in an InCopy document then run a script that will replace the name of the file with the actual image (either as an embedded image or as an image in a graphics frame, although the graphics frame might not work if the document isn't linked to an InDesign document.)
    I'm assuming I'd have to identify the image name in some way (slashes or something before and after) and during the script I'd have to identify where to find the given images, such as which folder they are in.
    Is this possible in InCopy?
    Eventually, these InCopy documents will be used in InDesign. Would it be better/faster to use a script to import these images into InDesign instead of InCopy?
    (In case the information is important, the images are all either .tif files or .eps files.)
    Also, how do I find someone who can write this script for me? I'm assuming there are freelance programmer people out there... how do I find one?
    Thanks for any advice/help you can give me!

    senza wrote:
    this is ok, this i understand now. But where to tell which schema for which user?I don't understand this question. You create a synonym in your own schema for the object you want a synonym for...
    so instead of referencing
    select * from scott.empyou would create a synonym for scott.emp, so you can do
    select * from emp

  • Slideshow from selected images in folder - LR3 creates previews of all images

    I select a number of images in a folder in the Library module and go to the Slideshow module. When I run the slideshow LR3 generates previews of all of the images in the relevant folder - rather than merely those for the images I have selected.
    I'm running LR3.2RC in Win 7 64 bit. The same happened with LR3 itself. My recollection (which may be faulty) was that this worked as I would have expected in LR2 (in other words, previews were generated only for the selected images in the folder).
    (I know I could add the selected images to a collection but I don't always necessarily wish to do that.)
    Stephen

    Hi Stephen
    In Slideshow module, on the toolbar you can click on the dropdown options against Use:
    Make sure you check selected items and not all filmstrip items.
    If you can’t see the toolbar above the filmstrip press T and T again to hide it.

  • Urgent: How to generate lo source images for slideshows?

    Hi everyone,
    I'm trying to generate low source images for my website, to reduce frustration for viewers downloading larger image files. In the past this has been easy to do one at a time, however I've got some slideshows on my website that are quite large and I'd like to be able to do the same for them. However, the low source auto generate button just generates a low source for the first image (the root source file of the slideshow) and not for any of the others. Is there a way to overcome this? Will it muck up the flow of the slideshow to have the low source images in the same folder with them?
    Thank you
    CJ

    Please can anyone help???

  • Script for making random thumbnails from single image

    Hi all,
    I need something like a hundred different thumbnails from each image in a series of images, that is, hundred random sections of the same image, saved in a folder as jpg,  and i was hoping that i could find a script for this.
    What the script has to do is:
    select the size of the crop (this would also be the dimensions of the thumbnail saved)
    rotate crop selection in a random orientation and place the crop randomly on the canvas
    save the image as a jpg in a folder
    return to original image,
    repeat process x times before quitting script.
    I dont think this should be to difficult to make a script for, but unfortunately i don´t know how to code.
    Is there anybody that could help me with this?
    This would save me a lot of time!

    You can give this a try:
    // create copies with pseudo random clipped and rotated parts of image;
    // thanks to xbytor;
    // 2012, use at your own risk;
    #target photoshop
    if (app.documents.length > 0) {
    var originalRulerUnits = app.preferences.rulerUnits;
    app.preferences.rulerUnits = Units.POINTS;
    // set name for folder to save jpgs to;
    var folderName = "rotatedJpgs";
    // set number of jpgs;
    var theNumber = 100;
    // width and height;
    var theWidth = 500;
    var theHeight = 500;
    // calculate some values;
    var theDiagonal = Math.sqrt ((theWidth * theWidth) + (theHeight * theHeight));
    var diagAngle = angleFromRadians(Math.acos((theWidth) / (theDiagonal)));
    // get file name and path;
    var myDocument = app.activeDocument;
    var docName = myDocument.name;
    try {
              var basename = docName.match(/(.*)\.[^\.]+$/)[1];
              var docPath = myDocument.path;
    catch (e) {
              basename = docName;
              var docPath = "~/Desktop";
    // create folder if it does not exist yet;
    if (Folder(docPath + "/" + folderName).exists == true) {
              var docPath = docPath + "/" + folderName;
    else {
              var theFolder = Folder(docPath + "/" + folderName).create();
              var docPath = docPath + "/" + folderName;
    // document dimensions;
    var docWidth = myDocument.width;
    var docHeight = myDocument.height;
    // jpg options;
    var jpegOptions = new JPEGSaveOptions();
    jpegOptions.quality = 10;
    jpegOptions.embedColorProfile = true;
    jpegOptions.matte = MatteType.NONE;
    // duplicate image;
    var theCopy = myDocument.duplicate (theCopy, true);
    var origResolution = theCopy.resolution;
    theCopy.resizeImage(undefined, undefined, 72, ResampleMethod.NONE);
    var docHalfWidth = theCopy.width / 2;
    var docHalfHeight = theCopy.height / 2;
    var theLayer = smartify2010(theCopy.layers[0]);
    theCopy.resizeCanvas (theWidth, theHeight, AnchorPosition.MIDDLECENTER);
    var theHistoryState = theCopy.activeHistoryState;
    // do the variations;
    for (var m = 0; m < theNumber; m++) {
    var theAngle = Math.random() * 360;
    theLayer.rotate (theAngle, AnchorPosition.MIDDLECENTER);
    //theCopy.resizeCanvas (theWidth, theHeight, AnchorPosition.MIDDLECENTER);
    // get tolerance offset;
    var theHor1 = Math.abs(Math.cos(radiansOf(theAngle + diagAngle)) * theDiagonal / 2);
    var theVer1 = Math.abs(Math.sin(radiansOf(theAngle + diagAngle)) * theDiagonal/ 2);
    var theHor2 = Math.abs(Math.cos(radiansOf(theAngle - diagAngle)) * theDiagonal / 2);
    var theVer2 = Math.abs(Math.sin(radiansOf(theAngle - diagAngle)) * theDiagonal / -2);
    // calculate max offset for unrotated overall rectangle;
    var thisHalfWidth = docHalfWidth - Math.max(theHor1, theHor2);
    var thisHalfHeight = docHalfHeight - Math.max(theVer1, theVer2);
    // calculate random offset for unrotated overall rectangle;
    var randomX = thisHalfWidth * (Math.random() - 0.5) * 2;
    var randomY = thisHalfHeight * (Math.random() - 0.5) * 2;
    var aDiag = Math.sqrt (randomX * randomX + randomY * randomY);
    var anAngle = angleFromRadians(Math.asin((randomY) / (aDiag))) + theAngle;
    anAngle = anAngle + Math.floor(Math.random() * 2) * 180;
    // calculate  offset for rotated overall rectangle;
    var offsetX = Math.cos(radiansOf(anAngle)) * aDiag;
    var offsetY = Math.sin(radiansOf(anAngle)) * aDiag;
    //alert (theAngle+"\n\n"+offsetX +"\n"+ offsetY+"\n\n"+ thisHalfWidth+"\n"+thisHalfHeight);
    theLayer.translate(offsetX, offsetY);
    theCopy.resizeImage(undefined, undefined, origResolution, ResampleMethod.NONE);
    theCopy.saveAs((new File(docPath+"/"+basename+"_"+bufferNumberWithZeros(m+1, 3)+".jpg")),jpegOptions,true);
    theCopy.activeHistoryState = theHistoryState;
    // clean up;
    theCopy.close(SaveOptions.DONOTSAVECHANGES);
    app.preferences.rulerUnits = originalRulerUnits;
    ////// radians //////
    function radiansOf (theAngle) {
              return theAngle * Math.PI / 180
    ////// radians //////
    function angleFromRadians (theRad) {
              return theRad / Math.PI * 180
    ////// buffer number with zeros //////
    function bufferNumberWithZeros (number, places) {
              var theNumberString = String(number);
              for (var o = 0; o < (places - String(number).length); o++) {
                        theNumberString = String("0" + theNumberString)
              return theNumberString
    ////// function to smartify if not //////
    function smartify2010 (theLayer) {
    // make layers smart objects if they are not already;
              app.activeDocument.activeLayer = theLayer;
    // process pixel-layers and groups;
          if (theLayer.kind == "LayerKind.GRADIENTFILL" || theLayer.kind == "LayerKind.LAYER3D" || theLayer.kind == "LayerKind.NORMAL" ||
          theLayer.kind == "LayerKind.PATTERNFILL" || theLayer.kind == "LayerKind.SOLIDFILL" ||
          theLayer.kind == "LayerKind.TEXT" || theLayer.kind == "LayerKind.VIDEO" || theLayer.typename == "LayerSet") {
                        var id557 = charIDToTypeID( "slct" );
                        var desc108 = new ActionDescriptor();
                        var id558 = charIDToTypeID( "null" );
                        var ref77 = new ActionReference();
                        var id559 = charIDToTypeID( "Mn  " );
                        var id560 = charIDToTypeID( "MnIt" );
                        var id561 = stringIDToTypeID( "newPlacedLayer" );
                        ref77.putEnumerated( id559, id560, id561 );
                        desc108.putReference( id558, ref77 );
                        executeAction( id557, desc108, DialogModes.NO )
                        return app.activeDocument.activeLayer
              if (theLayer.kind == LayerKind.SMARTOBJECT || theLayer.kind == "LayerKind.VIDEO") {return theLayer};
    ////// get an angle, 3:00 being 0˚, 6:00 90˚, etc. //////
    function getAngle (pointOne, pointTwo) {
    // calculate the triangle sides;
              var width = pointTwo[0] - pointOne[0];
              var height = pointTwo[1] - pointOne[1];
              var sideC = Math.sqrt(Math.pow(width, 2) + Math.pow(height, 2));
    // calculate the angles;
              if (width+width > width) {theAngle = Math.asin(height / sideC) * 360 / 2 / Math.PI}
              else {theAngle = 180 - (Math.asin(height / sideC) * 360 / 2 / Math.PI)};
              if (theAngle < 0) {theAngle = (360 + theAngle)};
              return theAngle

  • Script for Automator to reorder text in file/folder name.

    I have a folder full of pictures named by their first and last names. I need them to be renamed by listing them by last name first, first name last in order to get them alphabatized properly. Anybody out there have a nice Automator script for me to make this happen? I'm new.
    Looking for it to look like this:
    Brown, John

    Try this (should work for "John H Smith" --> "Smith John H" as well):
    The Run Shell Script Action is:
    for f in "$@"
    do
        basename=${f##*/}
        path=${f%/*}
        ext=${f##*.}
        name=${basename%.*}
        if [[ "$name" =~ \  ]]; then
            fname=${name% *}
            lname=${name##* }
            name="$lname $fname"
            mv "$f" "$path/$name.$ext"
        fi
    done
    If you want a comma, then change: name="$lname $fname" to name="$lname, $fname"
    As with all scripts, back-up the files before running

  • Need a script for squaring images of various sizes please

    Hello, new to this group but have been using photoshop for years doing basic editing. I have never done any sripting. I have a project on my hands. I have a lot of image of various sizes with some taller or wider than others. I need to make all these images exactly square though. Currently they vary and are wider or taller etc.
    I was wondering what process I could use hopefully with batch editing but was told scripting might be the answer to automate this process as I have about 8,000 images.
    So for example one image might be 200 pixels wide and 400 pixels high and another is 100 pixels high and 600 pixels wide and so on. I would need the
    1st example to be 400 x 400 and the 2nd example 600 x 600.
    I am using photoshop 5.5
    The software for a shopping cart is using a feature that allows you to zoom in on the image but if it is not perfectly square the image doesn't appear
    well in the software. Using magento e-commerce.
    Thanks for your help and any thoughts on this project of mine.
    Dave

    Here a simple script the does what I think you want.
    // squares the canvas. uses the background color
    var doc = activeDocument;
    var maxDim = Math.max( doc.width, doc.height );
    doc.resizeCanvas( maxDim, maxDim, AnchorPosition.MIDDLECENTER );

  • Image Quality for Slideshows

    Hello Everyone. I just purchased Photoshop Elements 9 and I have just joined the Adobe Forum. I am an amateur photographer with a challenge. I am creating slideshows for family, and before I go any further, I need to get some questions answered about quality. I have scanned old photos to my computer. I have scanned old negatives to my computer. I have digital pictures on the computer with varying ranges of size and quality. When these are imported into a slideshow program to be put on DVD, what kind of sizing and pixels per inch do I need to use so that when the DVD is played on a TV, (for instance, my brother has a HDTV that is 46"), the quality of the photos remain good for that size of a screen?  Another example would be a slideshow of my trip to the desert where I shot a couple hundred photos, and when I made the DVD, some of the images appeared pixelated, and/or noisy. The pictures were shot with a Nikon D50 3008x2000 pixels, 300dpi 24 bit depth jpegsRGB. The size of the original file is 2.78MB. I would appreciate any input on this. Thanks so much. Arthur

    Is the image quality improved for slideshows using the new Pro Encoding option in iDVD08? For me, the quality was unacceptable in previous versions
    iDVD '08s Pro Encoding mode won't improve things if your total DVD size is under 60 minutes (for a single layer disc) and can use Best Performance mode encoding.
    Best Performance uses a encoding bit-rate about as high as a DVD player can handle on playback. The Pro mode advantage will 'kick in' when you have content over 60 minutes. Best Quality simply picks a fixed encoding rate necessary to fit 'standard' content into the space available. The Pro mode will look at your content first and can assign a high encoding bit-rates for content with lots of detail or movement and a lower encoding bit-rate for content with less detail or movement. Pro modes highest encoding bit-rate shouldn't exceed the fxed encoding bit-rate used by Best Peformance.
    For slideshows, you must keep in mind that the DVDs we can make today are low resolution devices - NTSC discs are less than 640x480 pixels at best (that's less than 0.3 megapixels) - so your great 10 megapixel digital images MUST loose a lot of detail in the encoding process.
    FWIW - I recently made several large slideshows using FotoMagico that I felt gave me better quality than iMovie or iDVD directly. Others like Photo to Movie. Both offer free trial versions.
    F Shippey

Maybe you are looking for

  • Shipping Woes in canada

    Ok. I know a similar question has been asked many times before but really, how to deal with the outrageous shipping rates by Canada post that are nothing short of highway robbery? Just shipped an item that barely weighed more than 300 grams to Albert

  • How to set default Web Template for BEx Query iViews in BI Portal?

    Hi, 1) In SPRO you can set the Standard Web Template used, e.g. ZANALYSIS_PATTERN1. 2) I published a query to Portal and when it runs within Portal, I want it to use a different web template, say ZANALYSIS_PATTERN2. I don't want to change the BEx Web

  • How do I save or print consecutive pages from a web site document

    When visiting a web site and viewing a document with several pages, when I try to print the document out FF only prints the first two pages. Even when I say print pages.. say.. 1-6... only the first two pages are printed. Maybe one or more of my sett

  • Runtime Structure to get the Control Record

    Requirement: Populating the extended segments of standard IDOC ORDERS through user-exit.(During PO creation for Outbound) I want to apply a check on the extension type. Problem: Existing solution in 4.7 have a condition like If EDIDC-CIMTYP =  extens

  • Output Service Tax India

    Hi, I want to configure Output service Tax, Our FI consultant has already created three condition type for service tax, education Cess and SH education Cess and assigned these conditions to TAXINJ.He has also created the output tax code S1. I need to