What I see doesnât match this description
tell application "Finder"
set theItems to every item in window 1 as alias list -- correctly return a list of aliases
set theItems2 to (sort theItems by name) -- as alias list -- with or without the coercion, return a list of Finder's references
end tell
return {theItems, linefeed, linefeed, theItems2}
(*
{{alias "âŠ:Doc 2.numbers", alias "âŠ:doc 01.numbers", alias "âŠ:doc 02.numbers", alias "âŠ:doc 04.numbers", alias "âŠ:doc 1.numbers", alias "âŠ:doc 2 .numbers", alias "âŠ:doc 20.numbers", alias "âŠ:doc 3.numbers", alias "âŠ:doc 30.numbers", alias "âŠ:doc 4.numbers"}, "
", "
", {document file "doc 1.numbers" of folder âŠ, document file "doc 01.numbers" of folder âŠ, document file "doc 2 .numbers" of folder âŠ, document file "doc 02.numbers" of folder âŠ, document file "Doc 2.numbers" of folder âŠ, document file "doc 3.numbers" of folder âŠ, document file "doc 4.numbers" of folder âŠ, document file "doc 04.numbers" of folder âŠ, document file "doc 20.numbers" of folder âŠ, document file "doc 30.numbers" of folder âŠ}}
*)
(*
In the window sorted by name the list is
{"doc 1.numbers", "doc 01.numbers", "doc 2 .numbers", "doc 02.numbers", "Doc 2.numbers", "doc 3.numbers", "doc 4.numbers", "doc 04.numbers", "doc 20.numbers", "doc 30.numbers"}
*)
As far as I know, if the numerical components were treated lexically, I would get
{âdoc 01.numbersâ, âdoc 02.numbersâ, âdoc 04.numbersâ, âdoc 1.numbersâ, âdoc 2 .numbersâ, âDoc 2.numbersâ, âdoc 20.numbersâ, âdoc 3.numbersâ, âdoc 30.numbersâ"
âdoc 4.numbersâ}
Yvan KOENIG running High Sierra 10.13.6 in French (VALLAURIS, France) lundi 4 mai 2020 19:16:30