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

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

    http://www.maclife.com/article/howtos/how_share_your_iphoto_library_networked_storage

    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:

    Code:
    try
    	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

    Joined:
    Mar 17, 2012
    Location:
    Belgium
    #2
    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

    Joined:
    Apr 9, 2012
    #3
    I was trying stuff like

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

    Anyway I tried this:

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

Share This Page