property applsAlias : (path to applications folder)
on run
tell application "Finder"
set itemList to (items of applsAlias) as alias list
end tell
repeat with i from 1 to (count items of itemList)
POSIX path of (item i of itemList)
set item i of itemList to the result
end repeat
-- itemList is now a list of posix paths
repeat with i from 1 to (count items of itemList)
set applPosixPath to (item i of itemList)
try
set itemAlias to (file applPosixPath) as alias
on error
display dialog "error"
end try
end repeat
beep
delay 1
end run --------------------------------------------
When run from a script editor, it does not error.
If saved as an application, it errors every time.