Sushi70
Roter Delicious
- Registriert
- 06.05.17
- Beiträge
- 90
Ab jetzt bist du auf dich gestellt
Ohne Dich bin ich ein Nichts...
Ab jetzt bist du auf dich gestellt
on sortList(theList)
-- from: https://developer.apple.com/library/content/documentation/LanguagesUtilities/Con ceptual/MacAutomationScriptingGuide/ManipulateListsofItems.html
set theIndexList to {}
set theSortedList to {}
try
repeat (length of theList) times
set theLowItem to ""
repeat with a from 1 to (length of theList)
if a is not in theIndexList then
set theCurrentItem to item a of theList as text
if theLowItem is "" then
set theLowItem to theCurrentItem
set theLowItemIndex to a
else if theCurrentItem comes before theLowItem then
set theLowItem to theCurrentItem
set theLowItemIndex to a
end if
end if
end repeat
set end of theSortedList to theLowItem
set end of theIndexList to theLowItemIndex
end repeat
on error errMsg number errorNumber
return {"An unknown error occurred:"} & theSortedList
end try
return theSortedList
end sortList
-- select the destination folder -- Leonie
--set destination to choose folder with prompt "Select a destination folder to save the albums to" default location (the path to the downloads folder as alias)
--set dest to ((the POSIX path of destination) as text) as POSIX file as text
set dest to "/Users/r/Desktop/2019/" as POSIX file as text -- the destination folder (use a valid path). -- change this to your default path for a fixed folder
-- Display a dialog to select the original images or the edited versions
set r to display dialog "Do you want to export the originals or the edited versions?" buttons {"Originals", "Edited versions"} default button 1 with icon 2
set orig to (button returned of r is "Originals")
tell application "Photos"
activate
set unsorted to (name of albums)
end tell
set l to sortList(unsorted) -- Leonie
set albNames to choose from list l with prompt "Select some albums" with multiple selections allowed
tell application "Photos"
if albNames is not false then -- not cancelled
repeat with tName in albNames
set tFolder to dest & tName
my makeFolder(tFolder) -- create a folder named (the name of this album) in dest
if orig then
export (get media items of album tName) to (tFolder as alias) with using originals -- export the original versions
else
export (get media items of album tName) to (tFolder as alias) without using originals -- export the edited versions
end if
end repeat
end if
end tell
--tell application "Finder"
-- open (tFolder as alias)
-- return {"Done: "} & albNames
--end tell
on makeFolder(tPath)
do shell script "mkdir -p " & quoted form of POSIX path of tPath
end makeFolder
Wir verwenden essentielle Cookies, damit diese Website funktioniert, und optionale Cookies, um den Komfort bei der Nutzung zu verbessern.
Für die Ihnen angezeigten Verarbeitungszwecke können Cookies, Geräte-Kennungen oder andere Informationen auf Ihrem Gerät gespeichert oder abgerufen werden.
Anzeigen und Inhalte können basierend auf einem Profil personalisiert werden. Es können mehr Daten hinzugefügt werden, um Anzeigen und Inhalte besser zu personalisieren. Die Performance von Anzeigen und Inhalten kann gemessen werden. Erkenntnisse über Zielgruppen, die die Anzeigen und Inhalte betrachtet haben, können abgeleitet werden. Daten können verwendet werden, um Benutzerfreundlichkeit, Systeme und Software aufzubauen oder zu verbessern.
Durch das Klicken des Buttons "Zustimmen" willigen Sie gem. Art. 49 Abs. 1 DSGVO ein, dass auch Anbieter in den USA Ihre Daten verarbeiten. In diesem Fall ist es möglich, dass die übermittelten Daten durch lokale Behörden verarbeitet werden.