Applescript and iPhoto

I have an Applescript that will take the photos I've scanned in and imported to iPhoto and extract the date and time for the photo from the JPG filename, and put that info in the iPhoto date and time field. I have just learned that the "Batch Change" feature will change the EXIF date for a photo to match the iPhoto date.
Does anyone know of an Applescript solution that will do this (take the iPhoto date and use Batch Change to set the EXIF date)?

Hi Steven,
I don't know why the script doesn't work properly on your computer. Of course, GUI scripting is far from being foolproof. Maybe some of your preferences are not the same as mine. Maybe a few “delay” statements would be required at some places. Maybe a few other adjustments would be needed. I really don't know.
To test the script, you could first use the “Adjust Date and Time…” item of the “Photos” menu to manually change the date of a few photos of your photo album. Then select these photos and launch the script. The EXIF date of the original photo should be changed accordingly, exactly as you are asking for, and also as can be verified for example by opening the original photo in Preview.app.
It is very important to understand that the script calls the “changeDate” handler twice for each selected photo, the first time just in order to activate the "Adjust" button (by temporarily replacing the date assigned to the photo in iPhoto by the current date), the second time to replace the EXIF date of the original photo by the date assigned to the photo in iPhoto.
Sorry not being able to solve the issue.
Message was edited by: Pierre L.

Similar Messages

  • Sync two iPhones with two different iTunes and iPhoto libraries script

    I'm sure this is answered elsewhere, but I was not able to find a solution to this easily. My wife "L" and I, "J" have iPhones, also different tastes in music, and wanted a way to not have all of our own pictures filling up our default iPhoto library. So we first set up two different iTunes and iPhoto libraries. Two diffrent contact libraries would be nice, but contact groups worked okay for this. But then everytime we would sync, it meant opening both iTunes and iPhoto while holding the option key then selecting which library depending on which phone was going to be pluged in. Believe me, you only need to have "Automatically sync" turned on and plug in the wrong iPhone before all sorts of problems arise!
    Let me state, I am not fluent with AppleScript, but rather I found bits and pieces close to what I wanted here and there on the www and kept playing until it worked. This works flawlessly everytime on our MacBook, and, unless your initials are J & L and there are only two of you, you will have to change some letters here and there throughout the script to make it work for your situation. Think of this as a rough draft and start to play. I'm sure there is a simpler way to write this script, so to all the real authors, please re-write!
    So we have two libraries for iTunes and iPhoto. One set of libraries named J's iTunes library and J's iPhoto library, and another two named L's iTunes library and L's iPhoto library. I wanted to create one app that would close the current libraries, and open the correct ones (or return to our default libraries) depending on what iPhone was to be synced. Using AppleScript Editor and saving the script as an application, this is what I came up with:
    display dialog "Do you want to continue to set iTunes and iPhoto libraries?" buttons {"Cancel", "Continue"} default button "Continue"
    tell application "iPhoto" to quit
    tell application "iTunes" to quit
    set Y to the button returned of (display dialog "Which libraries do you want to use?" buttons {"L's", "Reset to Defaults", "J's"} default button "Reset to Defaults")
    if Y = "Reset to Defaults" then set Y to "i"
    if Y = "L's" then set Y to "l"
    if Y = "J's" then set Y to "j"
    tell application "System Events"
      key down option
      delay 1
              tell application "iPhoto"
      activate
      delay 3
                        tell application "System Events"
      key up option
                        end tell
              end tell
    end tell
    tell application "System Events"
      keystroke Y
              tell application "System Events"
      key code 36
              end tell
    end tell
    delay 2
    tell application "System Events"
      key down option
              tell application "iTunes"
      activate
                        tell application "System Events"
      key up option
      keystroke return
                        end tell
              end tell
    end tell
    tell application "System Events"
      keystroke Y
    end tell
    tell application "System Events"
      key code 36
    end tell
    if Y = "i" then tell application "iTunes" to quit
    if Y = "i" then tell application "iPhoto" to quit

    Hi, thanks for your answer.
    Unfortunately this does not work because iTunes still keeps one account with the store active regardless which library I open. So when I switch the account in the store it will be switched for both libraries. That means that I can not separate the iPhone applications and all the other specific sync parameters.
    I thought about using my wife's account on the Mac and pointing iTunes to the new library - the problem here is that then the iPhoto library is not accessible any more......
    I can't really believe that there is no solution from Apple - I mean there must be more couples and families out there with 2 and more iPhones syncing with one iTunes / iPhoto etc libraries.
    Any other ideas? Thanks in advance!

  • I am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier

    i am having macbook air recently my iphotos did not open and was showing report apple and reopen but i came to know that by pressing alt and iphotos i open an new photo library and stored the pics but now how can i get the pics which i had in the earlier photo please help me to recover my photos

    Well I'll guess you're using iPhoto 11:
    Option 1
    Back Up and try rebuild the library: hold down the command and option (or alt) keys while launching iPhoto. Use the resulting dialogue to rebuild. Choose to Repair Database. If that doesn't help, then try again, this time using Rebuild Database.
    If that fails:
    Option 2
    Download iPhoto Library Manager and use its rebuild function. (In early versions of Library Manager it's the File -> Rebuild command. In later versions it's under the Library menu.)
    This will create an entirely new library. It will then copy (or try to) your photos and all the associated metadata and versions to this new Library, and arrange it as close as it can to what you had in the damaged Library. It does this based on information it finds in the iPhoto sharing mechanism - but that means that things not shared won't be there, so no slideshows, books or calendars, for instance - but it should get all your events, albums and keywords, faces and places back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  
    Regards
    TD

  • Lightroom will not import my photos.   It did up to a week ago.   I have changed cards and cameras (both worked two weeks ago).   I can import the photos to Picasa and iPhoto

    Lightroom will not import my photos.   It did up to a week ago.   I have changed cards and cameras (both worked two weeks ago).   I can import the photos to Picasa and iPhoto.   I get the following error message:  
    Some import operations were not performed.
    The following files were not imported because they could not be read  [followed by a list of the files I wanted to import]
    Thumbnails show up.  LR just will not import them.
    Any idea what is going wrong?

    If the Import button is not clickable, that means that Lightroom thinks you have no new photos to import (one possible reason is that they are duplicates)
    So, you need to figure out why Lightroom thinks that. The way I would do this is to search your Library module for at least one of the photos, by file name. To do this, you would follow all 4 of these steps in sequence:
    Click on All Photographs in the Catalog Panel on the left of the Library Module
    Turn off all Filters (Ctrl-L or Cmd-L once or twice)
    Expand all stacks: Photo->Stacking->Expand All Stacks
    Search for one or more of the photos using the Filter Bar (press backslash), search by File Name

  • I have a macbook air - I am going to buy an iPad, will all my itunes and iPhoto etc be available on my iPad (how do I get it there)?

    I have a macbook air - I am going to buy an iPad, will all my itunes and iPhoto etc be available on my iPad (how do I get it there)?
    How do i check what of my info is on icloud (can iphoto be on icloud??) i have taken ten annual icloud subscription and i know my music is on it....

    You can download a complete iPad User Guide here: http://manuals.info.apple.com/en/ipad_user_guide.pdf
    Also, Good Instructions http://www.tcgeeks.com/how-to-use-ipad-2/
    Apple - iPad - Guided Tours
    http://www.apple.com/ipad/videos/
    Watch the videos see all the amazing iPad apps in action. Learn how to use FaceTime, Mail, Safari, Videos, Maps, iBooks, App Store, and more.
    How to - Articles & User Guides & Tutorials
    http://www.iphone-mac.com/index.php/Index/howto/id/4/type/select
    iPad How-Tos  http://ipod.about.com/lr/ipad_how-tos/903396/1/
    You can download this guide to your iPad.
    iPad User Guide for iOS 5
    http://itunes.apple.com/us/book/ipad-user-guide-for-ios-5/id470308101?mt=11
     Cheers, Tom

  • 2007 Macbook Pro suddenly coding over files, pictures, deleting itunes and iphoto albums, after it had been dropped in late november 2010. Apple specialists say they cannot find anything wrong. HELP!

    I have a Macbook Pro, the last generation, not the most recent one. It fell about 2 feet in late November 2010 and had the screen and logicboard replaced right after. A day or two after that, I started to notice that my word documents, pictures files, pdf files, itunes library and iphoto library were coded over and deleted out of nowhere. When I click on it, it says it is not a compatible format or cannot be read, etc. However, this doesn't happen all the time and not with every file. I could open a new word document and begin it today, and tomorrow it will not be retreavable, but I have a document on my desktop that has been there since January and can still be opened, so this happens without warning.
    I have taken it in to the Genius Bar at my local Apple store several times with this problem, and they say they cannot see anything wrong with my computer. On my most recent visit, the lady told me to buy an external hardrive, transfer everything onto it, then do a complete clean out of my computer and reboot it I guess. If it doesn't continue, then that might have been the problem, but if it does continue, then it is obviously not that. I am really confused and I don't know if I should trust that this is the problem or just go ahead and buy a new computer all together. I don't have applecare anymore.
    Help me!!! I am desperate.

    Does your MBP still have its original hard drive? If so, it may have started to go south. The average useful life of a notebook drive is 3-5 years, and if yours is the original, it would be about 4 years old. The drop could also have affected it.
    It might be worth booting from your install disc and repairing your boot disk. It sounds like you could have some directory issues. Repair until there is nothing left to repair. If Disk Utility cannot repair the drive, you will need a stronger utility like Disk Warrior or possibly a new drive.
    It also sounds like you may have some software corruption, which can happen if you have hard drive problems. Have you tried reinstalling the OS? You would want to make a backup first on an external drive and then use the archive and install feature and then update the OS.
    You might want to download and run SMART Utility:
    http://www.volitans-software.com/smart_utility.php
    You can download the demo and run it several times for free. SMART Utility seems to be somewhat more critical than Disk Utility, and may be able to detect impending drive failure sooner.
    If the drive checks out OK, then you can follow the advice you got from the genius and make a clone of your boot drive using Super Duper or carbon Copy Cloner on the external drive. You could boot from the clone you made and see how your Mac does when booted from a different drive. If all is good, you can reformat the internal drive and clone back to it.
    If all you need is a replacement hard drive, then your Mac is likely worth fixing. I too have a 2007 MBP, and I replaced my hard drive right after Applecare expired, as the drive started to fail a week after Applecare ran out. I put in a Western Digital 500 GB 7200 RPM Scorpio Black, and have been running on it ever since. I have also upped my RAM to 6 GB and my OS to Lion. Not all the features of Lion work on a 2007 MBP--the trackpad does not support Gestures, and AirDrop is not supported. Even so, I expect this Mac to last me a few more years.
    iFixit has instructions for replacing the hard drive, and OWC has both good RAM and kits for hard drive replacements. My gut feeling is that your hard drive is behind the weird symptoms you are experiencing.
    If you are ready for a new computer, by all means get one--there are some great choices. However, you should be able to fix your old Mac for not very much money and get some more use out of it.
    Good luck!

  • Have iphoto 9.0 working on a mac osx 10.7.4 yesterday ilife with idvd was downloaded into my mac,i can't open my iPhoto now its telling me to update app, but when i do it says no new updates are available at this time,and iPhoto update mesg pops up again.

    Have iphoto 9.0 working on a mac osx 10.7.4 yesterday ilife with idvd was downloaded into my mac,i can't open my iPhoto now its telling me to update app, but when i do it says no new updates are available at this time,and iPhoto update mesg pops up again.

    Hi,
    I scoured the web looking everywhere for a solution to this.
    Exit Code 15
    OSX 8.5 with Work@Home DVD media for CS6
    I followed instructions to run 3rd party cleaner software
    I tried the adobe removal tool
    removing all copies of adobe software manually
    installing from a new account, safe mode, plist everything suggested that i found did not work.
    A colleague suggested that removing the below folder would allow the installation:
    /Library/Application Supports/Adobe
    They turned out to be correct, so i am passing this on, because this took far too many hours of my time.
    Cheers,
    Smokey

  • Need help with applescript and Xcode 4.3.2

    I'm trying to write my first application that will involve a GUI. I can code applescript using script editor with a bit of effort, but I'm want to have users input more than one piece of information in the pop up. So, I download xcode, create my first applescript cocoa project go to MainMenu.xib and add a bunch of labels, text fields and buttons. Looks fairly nice... Go to start it and... nothing (well the window pops up, but it doesn't do anything). Unfortunately, I haven't figured out how to link the window to the applescript... So, how do I...
    * Have the applescript prepopulate data in the text fields and pulldowns
    * Once the user changes the data in the fields tell the applescript
    * Tell the window to close and pass the control back to the applescript once either the cancel or submit button is pressed.
    More detailed...
    * What's an outlet and how do I use it here? Which of the 18 outlet(s) do i use for this?
    * What's a property (referenced on one of the web pages I saw around applescript and cocoa) and do I need them here?
    Looking at the documentation with xcode, there isn't a lot about xcode and applescipt. Looking at the web, the top links are a few years old. So, links to good relevent documentation would be very nice as well as direct answers to the questions
    Thanks,
    Scott

    I'm not sure why you are closing it, but the NSApplication class is what keeps track of the windows.  If you don't want to connect the window to an outlet from the interface editor, you can use something like
    set theWindow to current application's NSApplication's sharedApplication's mainWindow()
    ...and from there you can use whatever NSWindow methods, for example
    theWindow's performClose_(me)

  • How to get Aperture and iPhoto to use Pentax *ist DL RAW images natively

    Using some techniques that I found in various places in these forums, I am going to give step-by-step instructions to get Aperture and iPhoto to recognize Pentax *ist DL RAW images natively.
    Note: This worked for me using 10.4.6 with the latest iPhoto 06 and Aperture updates. I do NOT know if this will work on older versions of OS X, iPhoto, or Aperture.
    Note: If you also use a Pentax *ist DS camera, these instructions will probably disable support for that particular device due to the modifications made to a system file. Only complete these instructions if you want to use a *ist DL camera.
    ** These instructions involve modifying system level files using a HEX editor. If you are not comfortable with this, do NOT attempt to do this or you could kill your system. Remember, BACKUP BACKUP BACKUP. These steps worked great for me but follow at your own risk!! **
    Ok, lets begin...
    1) Download this great patch by macintosh_tech
    http://idisk.mac.com/macintosh_tech-Public
    This patch contains an updated raw.plist file which includes the RAW information for the *ist DL. This patch also contains an updated libRaw.dylib file and an updated Raw Presets file for Aperture.
    ** Do NOT copy the libRaw.dylib file from this patch to the folder listed in the patch Read_Me. This file did not work on my Intel-based Mac and crashed my system!!
    I was able to modify my original libRaw.dylib file using a HEX editor to get it to work on my system. Instructions for this modification will follow.
    2) Open the .dmg of the patch in a Finder window
    3) Open a new finder window and browse to /System/Library/Frameworks/ApplicationServices.framework/Frameworks/ImageIO.fra mework/Resources
    *4) Backup the libRaw.dylib and Raw.plist files. Copy them to a safe location. For extra safety, you can just copy the whole Resources folder to a safe location (Make sure that you COPY it and dont MOVE it)*
    5) Right-click the libRaw.dylib file and select "Get Info". Look at the bottom of the info window and expand the "Ownership & Permissions" tab. In this section, expand the "Details" tab. If the lock icon is in the locked position, click it to unlock it. Change "Owner" to your user name. If requested, enter your system password at this point. Close the info window. This step lets you modify the libRaw.dylib file.
    6) Complete step 5 for the Raw.plist file.
    7) Copy the Raw.plist file from the "Place In System Folder" folder from the patch to the Resources folder. It will ask you if you wnt to overwrite the existing file. Click "Replace".
    8) Open a new finder window and browse to the /Users/YOURUSERNAME/Library/Application Support/Aperture/ folder.
    * 9) Backup the "Raw Decode Presets.plist" file *
    10) Copy the "Raw Decode Presets.plist" file from the "Place In Home Directory" folder from the patch to the /Users/YOURUSERNAME/Library/Application Support/Aperture/ folder. Click "replace" if it asks you.
    11) Here's the tricky part. Download a HEX editor if you don't have one. I used 0xED. It is free and can be downloaded from
    http://www.versiontracker.com/dyn/moreinfo/macosx/29521
    12) Open the libRaw.dylib file from the Resources folder in your HEX editor.
    Note: This is your original libRaw.dylib file from your /System/Library/...../Resources/ folder, NOT the file from the patch.
    Use the Find function and search for the string "Pentax *ist DS". Make sure you are using "Search Type: Text" (or equivilent in your editor) and that you use proper case. When you find this string, change the "S" in the "DS" to an "L". The string should now look like "Pentax *ist DL". Use the "Find Next" function to find the next instance of "Pentax *ist DS". Again, change the "S" to an "L". There should be two total instances that you need to change. Save the file and exit the editor.
    13) Open Disk Utility and repair permissions. This will set the raw.plist and libRaw.dylib files back to their original permissions.
    14) Reboot the system.
    15) You should now be able to view .PEF files natively in Aperture and iPhoto. I appologize in advance for any typos. Let me know how this works, as this is my first tutorial of this nature.
    Macbook 2.0   Mac OS X (10.4.6)  

    It would appear that my last post was a moot point as the 10.4.7 update adds support for the *ist DL. It's nice to have it biult into the operating system now.

  • Iphoto ver 8.1.2 unable to open iphoto. can hold down mouse button and 1 page of iphoto will open. click anywhere on screen and iphoto closes

    Cannot open iPhoto. It's on the toolbar, but will not open. I can hold the mouse over the icon and hold the mouse button down and iPhoto will open to a thumbnail photo, but if I click anywhere on the page, iPhoto closes. iPhoto shows open on top of page, but practically all selectable items are gray.

    It sounds like the window might have slipped down below the Dock or similar. Try change your screen resolution and (SystemPreferneces -> Displays) and that should force it back into reach. The return the resolution to whatever it was.

  • After upgrading to Mavericks and iPhoto 9.5 my shared photo streams seem to contain no photos when seen in iPhoto. From iPad the streams are fine. How can I get them to be recognized by iPhoto again?

    After upgrading to Mavericks and iPhoto 9.5 my shared photo streams seem to contain no photos when seen in iPhoto. From iPad the streams are fine. How can I get them to be recognized by iPhoto again?

    Disable Photo Stream in the System/iCloud preference pane
    and in iPhoto's Photo Share preference pane.
    Reboot and reenable both respectively. That should jump start Photo Stream.
    OT

  • Can I have the same iTunes and iPhoto on different users?

    I have 2 user accounts on my Laptop. Mine is the main one with all the music on iTunes and the photos on iPhoto. I was wondering if there is anyway, I can add these photos and music to the other user on my laptop.
    It is a macbook running on - Version 10.8.2 and a 2.26 GHz Intel Core 2 Duo
    Many thanks for any help.
    Ollivia

    Yes-
    To do this you need to get an external Hard-drive with enough storage space to hold your entire iTunes/iPhoto library. Then go to Finder and open your home folder, then locate music and find the iTunes folder.
    From here copy the folder onto you external drive. Then, locate the itunes folder in the other user, and replace the iTunes folder on your external drive with the folder in the music folder. Do the same with the iPhoto library. Then, you should have the same iTunes library and iPhoto library on both. You could then delete the itunes folder off of the external drive and use it for time-machine if you wanted.
    Hope this helps.

  • Aperture and iPhoto should use the same library

    Hi all,
    It seems that there is a lot of conversation about moving photos between Aperture and iPhoto. For example, some like iPhotos slideshow better but still require Apertures adjustment options. Still others have tried, to no avail, to use Aperture as iPhoto's external editor.
    Personally, I have a large iPhoto library with most photos tagged with keywords. I have just started using Aperture and am yet to decide if its extra features are useful for a novice photographer like myself. Other than the price, I see no reason not to use Aperture instead of iPhoto but I would want to import my entire iPhoto library into Aperture.
    My question, however, is why we need to 'import' from one app to the other. Without understanding how the aperture / iphoto databases work, I would assume there is no fundamental reason why Aperture could not simply open an existing iPhoto library and visa versa. They both support RAW, keywords, books etc. And while I am sure there are some deviations in the databases, surely each app could simply ignore the features it does not understand.
    Is this something that anyone else has considered or think would be good. I would imagine that the easier it is for customers to upgrade from iPhoto to Aperture the better. Does Apple plan on supporting this in the future or is the import option 'good enough'.
    Cheers

    Can I and if so how do I best set up Aperture as main app. (master) with iPhoto as sub app that accesses the same library to sort through, look at, order books, etc.
    Simply set the Preferences to 'Share Previews with iLife Applications' in Aperture. Then go to iPhoto -> File -> Show Aperture Library. A media browser will open and you can drag the pics from the Browser to the iPhoto Window. Note: You're getting the Aperture Previews not Masters. Note too that if you set iPhoto to Referenced mode (iPhoto -> Preferences -> Advanced) then you won't use double the disk space.
    +Remember though, you are not accessing the Aperture Library. If you make changes in the Aperture Library (Re-edit the shots) after bringing pics to iPhoto, those changes are not reflected in iPhoto.+
    This is what William means when he says the iPhoto does not access the Aperture Library.
    Regards
    TD

  • On my macbook pro I have a message on my homepage telling me that certain items want to use my keychain. I've pressed cancel the message will not go. The mac is now running very slow and iphoto and safari are not working. Can anyone help?

    On my macbook pro I have a message on my homepage telling me that certain items want to use my keychain. I've pressed cancel the message will not go. The mac is now running very slow and iphoto and safari are not working. Can anyone help?

    What version of Mac OS X?
    What home page?
    What browser?

  • I would like to connect an external hard drive to my time machine and use it as a network drive to store itunes and iPhoto  how do i do this

    I have just purchased a new my book hard drive and would like to connect it to my time capsule and store my itunes and iphoto contentent there to free up space on my internal hard drive . Can this be done and what is the process?

    I'd like to store my Aperture /IMovie Libraries on an external hard drive.
    That is fine and recommended.. use the fastest disk you can afford.. ie Thunderbolt>USB3>FW800>USB2.
    In addition, I'd like to partition the external hard drive so that Time Machine can use it to both back up my IMac and the external library drives.
    Let me be clear.. you want to partition the one disk.. use it for TM and move your files to the external disk.. and then backup to the same disk.. You can do it.. but that is not a backup.. that is an experiment in how long you can get away with running files and backups on the same disk before you lose everything.. like Russian Roulette.. pull the trigger enough times and laws of probability will do you in.
    You must have backups on a different disk .. otherwise it is pointless.
    Can I set up a RAID 5 format for redundancy?
    No.. you can buy special USB and Thunderbolt external drives that support RAID..
    BUT that is still not a backup.. let me show why.. you make a silly move and corrupt your file in aperture.. it is not that rare.
    Raid will corrupt all copies of the files.. it is replicated across all disks.
    Delete a photo it is deleted across all disks.. you have no recovery.
    Alway, always consider RAID system one disk.. backup onto another disk.. and if the photos or movies are at all important to you.. ie your family .. make another copy and store in a relatives house.. There is no such thing as too much redundancy.

Maybe you are looking for

  • How can I extract the data from Xstring .

    Hi Gurus , How can I extract the data from a XSTRING  . I have to get the data which is filled in the survey form the data is getting saved in form of xstring . Someone told me that there is a standard FM for that . but I am not able to find . Please

  • PCI-MXI-2 Linux driver 2.0 for kernel 2.4

    I would like to understand who *exactly* I should be getting this software from. Thanks, Andre

  • Problem with timer

    hi every body, i made a program that allow every client to send a message to another client, and to that i was created a table to make a client to write he's meesage to another client by using a form made for this purpose and then i was created a tim

  • BAPI_BUS2054_CREATE_MULTI - Populating custom fields

    Hi, I am using BAPI BAPI_BUS2054_CREATE_MULTI for creating WBS Elements. We have 18 custom fields at WBS element level. I am trying to populate the data for those 18 custom fields through EXTENSIONIN table parameter.  I am passing BAPI_TE_WBS_ELEMENT

  • Movie Too Long Message

    I wanted to create a single dvd of a home movie I created in iMovie that is about 1 hour long. When I brought it into iDVD5 I got the error that "the duration of your project is too long" or something similar. Is there a time length I should be shoot