Does anyone knows how to use the javascript functions of the Photo Suite in Apple's OSX script editor? The documentation is really bad or I do not understand the way of using it.
Doc description:
make
method : Create a new object. Only new albums and folders can be created.
make
new
: type : The class of the new object, allowed values are album or folder
[named
: text ] : The name of the new object.
[at
: Folder ] : The parent folder for the new object.
→
Album or Folder : The new object.
My code:
nameOfAlbumForPhotosWithoutAlbum="PhotosWithoutAlbum"
I tried the following, however none worked:
albumForPhotosWithoutAlbum=photos.make(album,nameOfAlbumForPhotosWithoutAlbum)
albumForPhotosWithoutAlbum=photos.make(photos.album,nameOfAlbumForPhotosWithoutAlbum)
albumForPhotosWithoutAlbum=photos.make(photos.album.type,nameOfAlbumForPhotosWithoutAlbum)
After reading the manual again, I tried the following, again without success. It returns: Can't find variable: Album
. The same happens to lower case. I tried typeof
, but I do not know how to get the type of the class Album.
albumForPhotosWithoutAlbum=photos.make({new:Album.name,named:"TestFolder"})
Thanks!