var Finder = Application ( "Finder" ) ; var selection = [ ] . slice . call ( Finder . selection ( ) ) ; var docLength = selection . length ; Finder . includeStandardAdditions = true ; Finder . displayAlert ( docLength . toString ( ) ) ;