Serpens
Gast
Weis jemand wie ich es schaffe ein bild in ein album reinzubekommen in iphoto?
Code:
on add_img(dir, alb)
tell application "Finder"
set tList to every item of dir
repeat with cItem in tList
tell application "iPhoto"
add (cItem) to album alb
display dialog cItem as string
end tell
end repeat
end tell
end add_img
(*
tell application "Finder" to set array to every folder of ("Mac:Users:Viper:Pictures:" as alias)
repeat with cItem in array
set cName to name of cItem
if cName is not "iPhoto Library" then
set makeAlb to "false"
tell application "iPhoto" to if not (album cName exists) then set makeAlb to "true"
--if makeAlb is "true" then
--tell application "iPhoto" to new album name cName
add_img(("Mac:Users:Viper:Pictures:" & cName) as alias, cName)
--end if
end if
end repeat
set array to every item of "Mac:Users:Viper:Pictures:Andere:"
tell application "iPhoto"
repeat with cItem in array
add (contents of cItem) to photo library album
end repeat
end tell*)
--tell application "iPhoto" to add "Mac:Fla.jpg" to photo library album -- das is nur n test