Hi,
setting labels and getting selected items from a window is "finder"-work which is slow …
So I guess setting the labels will be the part slowing down the script.
There may be a chance speeding up if leaving the finder whenever possible; also calling system events spends some time …
one thing that may also improve the speed: you can set labels to a list of files:
…
if optionKeyDown then
set the label index of the front window's items to myLabelIndex
else
--repeat with eachItem in (selected_Items)
--works for my lion-machine:
set the label index of selected_Items to myLabelIndex
--end repeat
end if
…
try to avoid finder created file list (slow!). For example if all the files in the window (folder) should be processed you could use standard editions to list, create aliases etc.
Hope it'll be of some help