Re: Scriplting the Photos application
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:
set importFolder to choose folder set extensionsList to {"jpg", "png", "tiff"} tell application "Finder" to set theFiles to every file of importFolder whose name extension is in extensionsList if (count of theFiles) < 1 then display dialog "No images selected!" buttons "OK" else display dialog "Create a new album with name" default answer "Imports" set albumName to text returned of the result set timeNow to time string of (current date) set today to date string of (current date) set albumName to albumName & " " & timeNow & " " & today set imageList to {} repeat with i from 1 to number of items in theFiles set this_item to item i of theFiles as alias set the end of imageList to this_item end repeat tell application "Photos" activate delay 2 import imageList into (make new album named albumName) skip check duplicates yes end tell 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
|
_______________________________________________
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