How to find out about the type of a container in Photos

32 Views Asked by At

I want to find out, iterating over containers in Photos, if a container is either a folder or an album with this statement:

set containerType to class of nextContainer as text

When i run this as a script i either get "folder" or "album" as expected. So my program works fine!

When i run this as an app, as wanted, it gives me something like lPfd or iPal!? Unfortunately i can not handle this properly.

How would you find out about the type of a Photos container and why is the behaviour so differently?

1

There are 1 best solutions below

0
pawi On

This is strange, even running in SriptEditor:

set containerType to class of nextContainer as text
if containerType is "folder" then

runs perfectly!

set containerType to class of nextContainer
if containerType is folder then

does not run!

What is the difference?