• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scriplting the Photos application
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scriplting the Photos application


  • Subject: Re: Scriplting the Photos application
  • From: 2551 <email@hidden>
  • Date: Sun, 19 Apr 2015 20:06:12 +0700

On 19 Apr 2015, at 19:32, Shane Stanley <email@hidden> wrote:
Hmmm. This probably won't work for you either. It imports photos, and arranges them as albums similarly to the way converted collections are arranged:



Coincidentally, I wrote a similar script a few days ago:

  1. set importFolder to choose folder
  2.  
  3. set extensionsList to {"jpg", "png", "tiff"}
  4. tell application "Finder" to set theFiles to every file of importFolder whose name extension is in extensionsList
  5.  
  6. if (count of theFiles) < 1 then
  7.         display dialog "No images selected!" buttons "OK"
  8. else
  9.         display dialog "Create a new album with name" default answer "Imports"
  10.         set albumName to text returned of the result
  11.         set timeNow to time string of (current date)
  12.         set today to date string of (current date)
  13.         set albumName to albumName & " " & timeNow & " " & today
  14.         set imageList to {}
  15.         repeat with i from 1 to number of items in theFiles
  16.                 set this_item to item i of theFiles as alias
  17.                 set the end of imageList to this_item
  18.         end repeat
  19.         
  20.         tell application "Photos"
  21.                 activate
  22.                 delay 2
  23.                 import imageList into (make new album named albumName) skip check duplicates yes
  24.         end tell
  25. end if


Both yours and mine work fine. But like Bill, I still can't get the properties on a selection.






Best

Phil

DisplayDroid beta (a lightweight script editor and automation tool) is now available for free download. More info on sqwarq.com/displaydroid
OSXClock - big, beautiful alarm clock and timer for your mac. More info on sqwarq.com/osxclock

http://applehelpwriter.com
http://sqwarq.com - apps for OS X & iOS






 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Scriplting the Photos application
      • From: 2551 <email@hidden>
References: 
 >Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: 2551 <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)
 >Re: Scriplting the Photos application (From: Bill Cheeseman <email@hidden>)
 >Re: Scriplting the Photos application (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: sqlite question
  • Next by Date: Re: Scriplting the Photos application
  • Previous by thread: Re: Scriplting the Photos application
  • Next by thread: Re: Scriplting the Photos application
  • Index(es):
    • Date
    • Thread