load iphotolibrary on NAS

Discussion in 'Mac Programming' started by ninecows, Mar 10, 2013.

  1. ninecows, Mar 10, 2013
    Last edited: Mar 10, 2013

    macrumors newbie

    Apr 9, 2012
    I followed the "harder way" of sharing an iphotolibrary between several macs on this guide:


    But it takes several steps to load the library (I can live with that, but the WAF is too low)

    I have to:
    1. make sure that the share "pictures" on my NAS is mounted
    2. then open/mount the iPhotoLibrary.dmg file on /Volumes/Pictures/
    3. finally open the ourpictures.photolibrary file on the newly mounted /Volumes/iPhotoLibrary.

    I tried making a script to do all of the above, but I cant get it to work... I'm pretty new in this scripting stuff. Can anyone help me with a complete script that will do this?

    I got so far that I can get the iPhotoLibrary.dmg mounted by doing this:

    	mount volume "afp://NAS/Pictures"
    	do shell script "hdiutil mount '/Volumes/Pictures/iPhotoLibrary.dmg'"
    on error
    end try
    ...but if I put anything after this script I will get an error about line ends and the " not being right...
  2. macrumors 6502a

    Mar 17, 2012
    What exactly are you trying to put after the try block? Please post your entire script and a screenshot of the contents of the iPhotoLibrary.dmg when it's mounted.
  3. thread starter macrumors newbie

    Apr 9, 2012
    I was trying stuff like

    open document file "iPhoto-bibliotek.photolibrary" of disk "iPhotoLibrary"
    basically just recorded via applescript.

    Anyway I tried this:

    do shell script "open /Volumes/iPhotoLibrary/ourpictures.photolibrary"
    and it worked :)

Share This Page