[SOLVED] Send photo/video to Photos.app

Is it possible to send a photo or video directly to an album inside Photos.app?
I found this article, but I can't seem to understand how to use it myself, even with some changes

So basically I would like to have a folder where I can drop images and photos and they will automatically be sent to a specific album inside Photos.app

That's a good idea. I'm not sure if I can figure it out for you, but the page you cited contains an excellent clue.

Even though AppleScript is a bit easier for me to understand, I'm nowhere close to being comfortable with it to actually come up with a solution.
I tried a few things that I thought could work, but they didn't.

Looking at the other person's code, I thought I could be able to get the ID of files, if they have one, but I have no clue how to do that.
The part of the script that creates a folder, that one worked. Now I just can't move a file to the album.


Someone at macscripter.net was kind enough to share the script and it's working like a charm!
Here it is

set imageList to (choose file of type {"jpg", "jpeg", "tif", "tiff", "png", "gif"} with multiple selections allowed)
importToAlbum(imageList, "Test")
on importToAlbum(imagePathList, albumName)
	tell application "Photos"
		set albumNames to name of albums
		if albumName is in albumNames then
			import imagePathList into album albumName
			make new album named albumName
			import imagePathList into album albumName
		end if
	end tell
end importToAlbum

Original post:

1 Like