set homeFlAlias to path to home folder
set docFlAlias to path to documents folder
set downArrow to (ASCII character 31)
try
tell application "Finder"
activate
delay 0.2
open homeFlAlias
select items 1 thru 3 of front window
set bounds of front window to {0, 44, 870, 520}
open docFlAlias
set bounds of front window to {550, 44, 1420, 520}
close front window
end tell
do shell script "open ~/Documents/"
delay 0.3
tell application "System Events"
tell process "Finder"
keystroke downArrow
keystroke downArrow using {shift down}
keystroke downArrow using {shift down}
end tell
end tell
tell application "Finder"
delay 2
set sel to selection as alias list
if sel ≠ {} then
repeat with i in sel
set label index of i to 2
end repeat
update target of front window
end if
end tell
on error errMsg number errNum
set sep to "=============================="
set e to sep & return & "Error: " & errMsg & return & sep & return ¬
& "Error Number: " & errNum & return & sep
beep
display dialog e
end try