Help with AppleScript to create a file alias

Thank you Michael!

So it seems that this isn’t working with me. I’m allowing duplicates in my library but when I run this script I get the same behaviour as before, a grey area in the record view pane. This is illustrated in the first screenshot.

I actually overlooked a bit this, because in Finder the alias was created in the same folder, which means that the name was not the same as the original file (it attaches a “alias” to the end of the filename).

If I rename the file within the AppleScript with a shell command:

set srcFile to quoted form of ((POSIX path of theOutputFolder as string) & _name)
set dstFile to quoted form of ((POSIX path of theOutputFolder as string) & _name & " alias")
do shell script "mv " & srcFile & " " & dstFile

then EagleFiler does display the Alias icon but the viewer actually shows the file contents…

Although this way does seem to be working, not sure if this is the expected behaviour from what you were describing.

Many thanks,
Pedro