Applescript to open different Aperture library

Hi,
I got tired of using the prefs in Aperture to set which library to open so I wrote this little applescript. Just drop an Aperture library file on this applet and it will set the prefs in Aperture to open that file, and then open Aperture.
The script is released into the public domain.
To compile the script, copy it and paste it into a new AppleScipt. Save the script as an application and you are good to go.
I keep it in my dock to launch Aperture. If no LIbrary is dropped on it, it just open Aperture.
Hope someone finds this useful.
-Allan
---- start cut here ----
on open (theFiles)
set lib to quoted form of POSIX path of theFiles
if isAppRunning("Aperture") then
tell application "Aperture" to quit
end if
repeat while isAppRunning("Aperture")
delay 1
end repeat
try
do shell script "defaults write ~/Library/Preferences/com.apple.Aperture LibraryPath " & lib
end try
delay 1
tell application "Aperture" to activate
end open
on run
tell application "Aperture" to activate
end run
on isAppRunning(pAppName)
tell application "Finder"
set appIsRunning to process pAppName exists
return appIsRunning
end tell
end isAppRunning
---- end cut here ----

Very cool! I almost went and wrote an applescript to do this in the last few days but didn't get around to it. Too lazy to figure out what the defaults write should be.
This almost guarantees that apple will announce a new version of aperture in the next couple of days that handles multiple libraries gracefully!

Similar Messages

  • When I try to open my aperture library, I get the message "There was an error opening the database for the library "/Users/alyssabouma/Pictures/Aperture Library.aplibrary". help!

    When I try to open my Aperture Library, I get this message: "There was an error opening the database for the library “/Users/alyssabouma/Pictures/Aperture Library.aplibrary”.
    I have already uninstalled and reinstalled the library....Help!!

    lyssalou,
    what is your Aperture version and what is your MacOS X version?
    What happened, before this problem occurred? Did you import images, install software, move the Aperture library?
    I have already uninstalled and reinstalled the library....Help!!
    What do you mean by reinstalling the library? Did you reinstall Aperture?
    You might start the trouble shooting with using the Aperture Library First Aid Tools - repairing the permissions, repairing the library, and rebuilding, if necessary, see:
    Aperture 3 User Manual: Repairing and Rebuilding Your Aperture Library
    Before rebuilding the library, make a backup of the Aperture Library, if you do not have one.
    Regards
    Léonie

  • No opening of Aperture Library.aplibrary any more: HOW TO GET ACCESS?

    It took me a long time till I decided to write this topic- I tried ALL the tips and hints described in this forum before.
    This is the situation: APERTURE (1.5.2) does not open its library any more.
    After having read about similar problems described in this forum, and after not beeing able to resolve the problem, I finally...
    - backed up the whole machine
    - reinstalled system (10.4.9) including all system updates (clean install, formatting HD)
    - re-installed APERTURE from original DVD
    - ran updater to arrive to APERTURE 1.5.2
    - re-installed new Prokit File in System/Library/PrivateFrameworks/ProKit.framework/Versions/A/Prokit, got the file here: http://www.itsadirtyword.com/downloads/ProKit.zip, from thread
    http://discussions.apple.com/thread.jspa?threadID=892893&tstart=30
    - opened Aperture.
    Till here all OK. Aperture opens and shows a vergin project, asking if I wish to import sample project.
    Now I wish to get my photographs back from the backup file.
    I give the command "rebuild from backup" (maybe in english it's different, I do have a german version of APERTURE installed, there it is called "Bibliothek wiederherstellen").
    Now APERTURE starts (and shows me) the import process, counting down around 80.000 files (there are not THAT many photographs, I guess it includes all the preview-files). This takes quite a while. When finished, it says: "Import was OK, now you have to re-start the program". No choice is given, I just push the restart button, APERTURE quits, launches again- but it does not open the project file. Just the startup screen is seen, and then the menu- but no window.
    If I check for the Aperture Library.aplibrary file, it is there, in the correct folder, now 42 GB, which corresponds to the size of the backup file.
    I do not have a chance to open it, however.
    Even if I Quit the program, throw away com.apple.Aperture.plist (from >Library>Preferences) and re-start it again, it won't open the Library File. Just nothing comes.
    Throwing the Aperture Library.aplibrary file, it causes APERTURE to create a new one upon start-up. If I then re-import the backup file, the same thing will happen again: Once the re-import finished, it will not open the project window any more.
    I absolutely NEED to access these photographs. Please help.
    Thank you,
    Markus
    Mac Book Pro 17'' Dual Core, 200GB, 2 GB RAM   Mac OS X (10.4.9)  
    Mac Book Pro 17''   Mac OS X (10.4.9)  
    Mac Book Pro 17''   Mac OS X (10.4.9)  

    Thank you so much, David, for your efforts!
    I had tried this, but no result.
    As APERTURE worked as soon as I had thrown the BIG library (the program just created a virgin library, which worked when importing pictures), I presumed the problem was the library file.
    Even if I get upset that this kind of data base file is not bullet-proof, storing thousands of pictures which have enormous value (and where even the BACKUP file seemed to be corrupted, as the problem came up restoring the backup file!), I started from the idea that the problem was this library file.
    So, I...
    - made APERTURE create a virgin library.
    - opened the old (corrupted?) library file by option-clicking on the file and clicking onto "Show Packet Content".
    - I IMPORTED the different "xxx.approject"-files by hand into the new library.
    This took me a quite while, but now it seems the system is up again.
    Some photographs (shot in Nikon RAW format) show as "not supported file", I have to see how to deal with this, and if for example by exporting them I can save something.
    I now made a backup, creating a new vault, and it worked with no error messages. Also controlling the vault file, everything seems to be there.
    So, "somehow" all is saved, even if the real problem has not been found. This is why I will not set the flag on "Answered question".
    As I mentioned before, I think that this data base handling of APERTURE has to be (nearly) 100% safe, as Mac OSX is.
    It just HAS to work, no chance to arrive to "corrupted files" or something like this.
    Apple: Build in automatic database repairings, make sure the backup files ARE ok (mine was not, it seems), do whatever is necessary for not leaving any possibility for "inconsistent files" or stuff like that.
    If these things just CAN (and do) happen, the software is not worth a penny.
    The photographs just HAVE to be in a secure place, like money brought to bank just HAS to be safe there. If even the BACKUP file is corrupted, WHERE is the security for my photographs?
    Apple, if you wish to play in the "professional filed", this just HAS to work. No other choice.
    Thanks again David for your efforts!
    Markus
    Mac Book Pro 17''   Mac OS X (10.4.9)  
    Mac Book Pro 17''   Mac OS X (10.4.9)  

  • I am unable to open my Aperture library after my computer crash!!

    I get the following error meassage after my computer crashed and now unable to open Aperture library. Do not have any of my photos backed up as yet!!!
    "There was an error opening the database for the library “/Volumes/My Passport for Mac/Aperture Library.aplibrary”.

    The Crash may have prevented Aperture from closing the Library properly.
    Make a backup copy of your Aperture library, before you proceed.
    Then try to repair the library using the "Library First Aid Tools":
    Aperture 3 User Manual: Repairing and Rebuilding Your Aperture Library
    Locate the Aperture library on your My Passport drive, then hold down the Command and Option keys while double-clicking the Aperture library.
    Select Repair Database from the First Aid panel.
    If that does not help, repeat, but select "Rebuild database".
    If you still have prolems, post back and explain, what happened before Aperture crashed.
    Regards
    Léonie

  • HT201250 Cant open the Aperture Library on my external hard drive

    I have backed up my Hard drive using Time Machine including my Aperture Library however I can not open the library on the external drive as  a dialog pops up informing me that I don't ave any permissions. Aperture then closes. Read write permissions for the library seem to be fine

    dewifromaberystwyth wrote:
    What is the best procedure to do this.
    Don't use Time Machine to copy a Library.
    Just copy your Library (it's a file; copy files using the Finder) to any locally-mounted (i.e.: not networked) drive, then double-click the Library name in a Finder window.  This will opened the copied Library (perforce from its location on the external drive) and let the OS and Aperture know that it is the Library you wish to use.  Confirm that it is complete and works correctly, then delete the "old" Library on your system drive.  Note that you should include the external drive in your back-up practice.
    The external drive must be formatted Mac OS Extended (Journaled).  Format drives using the OS X bulit-in program Disk Utility.
    Post back if you still get permissions denials.
    As always, _never_ use any computer file without having a back-up available.

  • AppleScript for opening different iTunes libraries

    I want an application that will, at the press of a button open one of my two iTunes libraries, as I have to switch between them with frequency. Unfortunatly, I can't figure out how to tell iTunes to open a specific library. I have what I tried pasted below. No mater which button I press, (except for "cancel" of course!) it just opens the last used library. What am I supposed to do?
    Thanks.
    tell application "iTunes" to quit
    display dialog "Choose an iTunes Library to open" buttons {"Normal iTunes library", "mp3 library", "cancel"} default button 1
    copy the result as list to {buttonpressed}
    if the buttonpressed is "Normal iTunes library" then
    tell application "Finder" to open POSIX file "/Users/benlevy/music/iTunes/iTunes Library"
    end if
    if the buttonpressed is "mp3 library" then
    tell application "Finder" to open POSIX file "/Users/benlevy/music/mp3 iTunes library/iTunes Library"
    end if
    if the buttonpressed is "cancel" then cancel
    end

    I know those things! I do switch manually all the time. I want this program to eliminate the hassle.
    The reason for having two libraries is because I have an mp3 player that uses the iTunes library file structure to copy music (including the artists, albums, genres, etc) onto its hard disk. Unfortunately, it is small (2Gb) and it only handles mp3s. Luckily, I have been able to create a work flow that saves all the high quality aac files from my regular itunes library, and copies highly compressed mp3 versions of them to my "mp3 itunes library." I need to open the mp3 library to sync my mp3 player, but to listen to music I use the normal library. I don't want to deal with two copies of each song in 1 library!

  • Failing to open an Aperture library

    Aperture wouldn't open one of my libraries, citing a permission problem.  When I did a cmd-I for the library, I could see that 'Everyone' had only read access.  When I authenticated myself and tried to set this permission to 'read and write', I got a message that this operation could not be completed due to an error  -8076.
    What is this error, and how can it be fixed?

    The exact error message:  This operation cannot be competed. An unexpected error occurred (error code -8076).
    (plus an OK button).
    That is the error message you cited, when you tried to change the permissions, but what is the error message, when you try to open the library in Aperture?
    My library file is located on an external drive (with an exact copy on another external drive).
    Is this drive correctly formatted as MacOS Extended (Journaled), and is the "Ignore Ownership on this Volume" flag set? This flag is in the Ownership&Permissions brick of the Get Info Panel for the drive.  You'll have to click the padlock icon and authentificate to be able to change this flag.
    Is the external drive directly connected or a network volume?

  • I cannot open iphoto, this message occurs each attemptTo open this Aperture library in iPhoto, you need Aperture 3.3 or later. Click Update Aperture to buy the latest version of Aperture from the Mac App Store.  After installing the update, open your

    i do not have Apeture, nor do i want it, how can i access iphoto ?

    When did this problem first occur? Directly after you upgraded to Yosemite and iPhoto 9.6?  Or after a crash?
    If this happened directly after the upgrade, look into the iPhoto library package, but do not change anything there - be very careful.
    A healthy iPhoto Library should look like this, when you ctrl-click it in the Finder and use the commend "Show Package Contents".
    First of all - does the iPhoto Library show the correct "fan of Pictures" icon?
    Is there an additional folder "Old Masters" in addition to your folder "Masters"?
    When you select the file "Info.plist", does the preview show correctly iPhoto Library 9.6?
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
    <dict>
      <key>CFBundleGetInfoString</key>
      <string>iPhoto Library 9.6</string>
      <key>CFBundleShortVersionString</key>
      <string>9.6</string>
    </dict>
    </plist>
    If it is not showing iPhoto but Aperture, try to trick iPhoto in opening the library by setting the File extension of the iPhoto Library to "photolibrary"
    But if you are seeing a folder "Old Masters" in your library, you are having a bad library corruption. Then look into that folder, if it contains any photos and post back.

  • I am unable to open my aperture 3 application on my macbook pro.  I access my aperture library on a 2tb external hard drive.  The aperture application is not responding and will not even bounce in the dock.

    I use aperature 3. For the past 2 days, I have been unable to open the aperature application.  The icon does not even bounce in the dock.  I keep my aperature library on a 2 tb external hard drive.  I have never had this problem.  Any thoughts?  Thanks

    For the past 2 days, I have been unable to open the aperature application.
    What happened directly before this started? Have you updated software, installed something new, imported new images? Run any applications to clean the mac?
    And what is your Aperture version and MacOS X version? Is your profile signature still current (MacBook Pro, Mac OS X (10.7.2), i just upgraded to lion)?
    Have you checked, if Aperture is still installed in your Applications folder? Does it start, if you click it directly in Applications and not from the Dock?  Does Aperture start, if you click it while holding down the ⌥-key and select a different aperture library not on your 2 TB drive?
    Regards
    Léonie

  • "To open this iPhoto library in Aperture, it first needs to be upgraded".  Aperture already up to date. still cant open aperture library. please advice

    When I try to open my aperture library, this is the message pop out  " TO OPEN THIS iPHOTO LIBRARY IN APERTURE, IT FIRST NEEDS TO BE UPGRADED. "
    My apperture application is already up to date. no more upgrade available. please advice what to do.

    The update refers to the library not the application. 
    So is this an Aperture library you are trying to open in iPhoto or an iPhoto library you are trying to open in Aperture? You're post is confusing on this point.
    In either case make sure the library is up-to-date in the originating application then the other should open it.
    BTW what version of iPhoto abnd Aperture are you running?
    Message was edited by: Frank Caggiano

  • Aperture Library both 3.1.2 but still cant be open library as its a newer version of aperture? Help :(

    Clicked GET INFO on my Aperture Library and it shows version 3.1.2
    Clicked [APERTURE] then [ABOUT APERTURE] and it also says version 3.1.2
    Go to open the aperture library and then this pops up
    The library in “/Users/main/Desktop/Aperture Library.aplibrary” cannot be loaded because it is from a newer version of Aperture.
    ***? any help is appreciated... i cant open my library and all my projects are there

    Hey mate
    Weird. So you've verified that your Aperture app is at 3.1.2 by right-clicking on it and seeing that it says 3.1.2 next to Version. And you've verified your library the same way.
    I know yes def verified as per your comment both library and app version
    So, go to the app (the 3.1.2 version, of course) in the Applications folder, hold option down and double-click on it. You should get a box asking you to choose a library. The version of the library should be in the column next to it. Choose the library that is 3.1.2.
    I have two libraries, OLD (the one i want to use) and NEW (which is what i had to create to at least allow me to open the application. Both Libraries show 3.1.2 as its versions and the app is def 3.1.2
    If this doesn't work, I would look at the Troubleshooting basics that are found here: http://support.apple.com/kb/HT3805 Let us know how it goes.
    So i tried this as well, still no good. Why? Well Aperture always opens the previous library it used and because each its always opening that, i cant even begin to trouble shoot it - unless you know or can think of something else.

  • There was an error opening the database for the library "/Volumes/My Passport/Aperture Library.aplibrary".

    My computer has switched itself off and I am now unable to open my Aperture library as getting the above message!!

    The Crash may have prevented Aperture from closing the Library properly.
    Try to repair the library using the "Library First Aid Tools":
    Aperture 3 User Manual: Repairing and Rebuilding Your Aperture Library

  • Opening Aperture Library from my Drobo (Very Slow)

    I have a Firewire Drobo, which I love, and I use Aperture on my Mac. I currently have my primary Aperture Library (~125GB) on my Drobo. I have been experiencing an issue with slowness when opening my Aperture library from my Drobo. It takes several minutes (5-6) to open my library from the Drobo and am wondering if 1) others are experiencing excessive slowness when opening their Aperture Library from a Drobo and/or 2) if I would be better off just using a regular firewire drive for my Aperture library and using the Drobo just for my Aperture Vault and not my primary library?
    It seems that this issue has gradually gotten worse as my library has increased in size. When the library was 50GB it seemed to open pretty quickly, but the bigger it gets the longer it takes to open. Once it is open it is fairly snappy, although if I am reading and writing a lot of data to the Drobo simultaneously I will see some slowness sometimes. This machine is the current generation of 24" iMac with 4GB of RAM. My Drobo is filled with 3 - 1TB Western Digital Green drives and 1 500GB WD Green drive.
    Would love to hear if others are having a similar experience and any ideas for better performance.
    Thanks!
    Guy

    I don't think the FW is the problem, although it might be
    I was keeping my Aperture library on a Drobo and ALL of the images were referenced and not managed.
    And like you, it became progressively slower (5-10-15-20 minutes to open) and then became corrupted on more than one occasion. After the last episode and after substantial heroic efforts (48 hours of rebuilding), I was able to recover the library. Once recovered, I moved the library to my internal drive and left all of my images as referenced on the Drobo. The library since the move has been fine. I have occasional images which appear to become corrupted on the Drobo (not recognizable by Aperture or Photoshop or Preview), that fortunately, I simply replace the RAW file in the appropriate location from a back up copy of the RAW file and everything is fine.
    This has been discussed with Data Robotics and after several weeks I still don't have an answer from an email I sent providing all the requested information.
    Bottom Line. Place your referenced your images on Drobo, but make sure you have at least two other additional backup of your original datafiles. Move your library to some other drive immediately!!
    My suspicion is Aperture and Drobo RAID system do not work well together and Data Robotics has been disappointing in terms of technical response to inquiries.
    I have two Drobo boxes and they are used daily, but at this point I always, always always have at least two back ups on whatever is on the Drobo. My dream was it would be a highly or super reliable copy of my data, but at this point, I really do not consider them to be even a reliable copy, given the random corruption issues and Data Robotics poor support.
    I am investigating alternative large data systems and the most interesting thus far is the WD Share gigabit system. Data Robotics says that they only certify one other FW drive and it HAS to be a Data Robotic drive and not another vendors. FW is supposed to support up to 16 devices according to Apple so there is a huge disconnect. I do use several drives downstream from my 2nd Gen Drobo units, I mount/unmount religiously and have not had obvious problems with other drives.
    Having said that, I have not had another corruption problem since December 26 or so, but I also have not looked at every RAW file of the 40,000 stored on the Drobo. I figure I will find more, but will replace them as I find them.
    Regards, Steven

  • Can't open aperture library in iPhoto

    When I try to open my Aperture library (v3.4.4) with iPhoto (v9.4.3), I get the following message and the application quits:
    Aperture library needs to be upgraded.
    To open this Aperture library in iPhoto, it first needs to be upgraded with Aperture 3.3...
    Both iPhoto and Aperture worked properly with a shared library prior to installing the 3.4.4 Aperture update in mid-April 2013. Upon first launch of Aperture after the update, there was a message stating that the library needed to be upgraded. The upgrade completed succesfully, and Aperture has been running properly.
    To remedy the problem, I have tried the following:
    1) Repair Permissions of the Aperture library
    2) Repair Database of the library
    3) Rebuild Database of the library
    4) Opening the iPhoto library with the menu command <Open Library in iPhoto> in Aperture (Same notice to upgrade the library appears)
    My setup is:
    - Latest 27" iMac w/ 3.2GHz Core i5, 16GB RAM
    - OSX 10.8.3
    - Aperture v3.4.4
    - iPhoto v.9.4.3
    - Aperture library is stored in the local hard drive in the Pictures folder
    - iPhoto used to make print products only availble in iPhoto
    I have searched the boards and have noticed people with similar symptoms but not the same circumstances.
    Does anyone have a suggestion or solution?
    Thank you.

    Added:
    Just in case you cannot find a backup of the Aperture Library that has been created with AP 3.4.4, make a current backup of your Aperture library and trash the file "DataModelVersion.plist". Then open your library in Aperture 3.4.4. Aperture creates a new version of this file, at least my experiments showed, that the file can be restored this way.

  • Unable to open Aperture library in Photos

    Hi,
    I am unable to open my Aperture library in Photos.
    In the attempt to get this fixed, I carried out from within Aperture (by pressing alt-cmd during Aperture startup) in 'Photo library first aid' all three options that are offered: Repair permissions, repair database, rebuild database - nothing helped. I also had corrected before some dangling references to pictures that are not managed in the library; there are no offline or unreferenced pictures in the library.
    In 'Photos' I am getting a pop-up windows with the message at stage "Preparing library ... 69% completed": "The library could not be opened. Photos has attempted to repair the library xxxx, but is unable to open it."
    However, that same library opens fine in Aperture, and also in iPhoto.
    What is the problem?
    Thanks
    Wolfgang

    I talked to apple support.  They recommended doing a basic level permissions repair using the following procedure:
    The advice is a little outdated, and you just have to run the disk utility program to repair the permissions on your main drive and the drive upon which you store the databases.  I have tried the following procedure and have re-run the importation procedure.  Just at 1% now - so I hope that it will work this time.  If it doesn't, I will report back after talking to a  Level 2 person at Photos support.
    JF
    In the newest versions of OS X, there is an additional Repair Permissions application utility hidden away. This tool is located inside boot Repair Utilities. Here’s how to access it.
    Restart OS X and hold down the Command and R keys.
    You will boot into the Repair Utilities screen. On top, in the Menu Bar click the Utilities item then select Terminal.
    In the Terminal window, type “resetpassword” (without the quotes) and hit Return.
    The Password reset utility launches, but you’re not going to reset the password. Instead, click on the icon for your Mac’s hard drive at the top. From the drop-down below it, select the user account where you are having issues.
    At the bottom of the window, you’ll see an area labeled ‘Reset Home Directory Permissions and ACLs’. Click the Reset button there.
    The reset process takes a couple of minutes. When it’s done, quit the programs you’ve opened and restart your Mac. Notice that ‘Spotlight’ starts re-indexing immediately.
    Great tip, thanks for sending this in Tony R!
    Update: This works in OS X 10.7 Lion, and 10.8 Mountain Lion, OS X 10.9 Mavericks, OS X 10.10 Yosemite, and newer.

Maybe you are looking for

  • Pics in iPhoto on iMac

    Are my pictures automatically saved on my hard drive that I have loaded into iPhoto on my iMac?

  • Slow phone after iOS4 upgrade? Try this...

    I upgraded my iPhone 3G recently to iOS4, and experienced the general slowdown that others have reported. I also had problems with photos not displaying correctly. I deleted and reimported the photos, and that solved that problem, but the slowness an

  • From the Community: Apps we've built

    Similar to our other posting, Overview of Requested Functionality, it makes sense to me that we share in one place the apps that we have released in the store.  I believe it will help the community to see examples built, encourage others to continue

  • IPod Touch-can you deactivate Internet?

    Good morning all you experts! Quick question: Is there a way to somehow de-activate Internet access on an iPod Touch? My nephew wants one but my sil doesn't want him accessing wi-fi all over the place. Can you use the Touch without the Internet? Remo

  • Gamecenter for Macbook Pro

    I downloaded OS X Mountain Lion onto my MacBook Pro. When I open Game Center, it asks for my Apple ID. My Username is already there, I just need to type in my password. Once I do so and press Sign In, nothing happens, I can't get it to log in. I've t