I can’t understand why this code does not work. aItems is an array with paths to aliases.
repeat with j in aItems
set Aliasname to name of alias file j
display dialog Aliasname as string
end repeat
I just want to get the name of each alias in the array, but it fails with:
error number -1700 from alias file … of startup disk to integer
When I hard code a path to an alias (literally the same path that is in j) it works just fine. What am I doing wrong?
2 suggestions. First I assume you got the aItems inside a Finder tell block of code. You also need to get the name from the Finder too, so first make sure the name line of code is inside a Finder tell block. Second, your list of aItems is a list of file references so when you ask for the name you don’t need “alias file”. Just ask for the name of j.
I hope that helps. Good luck.