From Rosetta Code

Wiki display of AppleScript code

AppleScript code seems, empirically, to display better here if we paste it with the tab-indentations of Script Editor etc replaced with multiples of 4 spaces.

(At the moment your code is getting a bit inflated horizontally by the tabs, and hence a bit susceptible to ragged wrapping, which is a pity) Hout (talk) 11:01, 26 February 2020 (UTC)