2 tell application "Finder"
3 tell disk (volumeName
as string)
11 set theBottomRightX
to (theXOrigin + theWidth)
12 set theBottomRightY
to (theYOrigin + theHeight)
13 set dsStore
to "\"" &
"/Volumes/" & volumeName &
"/" &
".DS_STORE\""
16 set current view to icon view
17 set toolbar
visible to false
18 set statusbar
visible to false
19 set the bounds
to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY}
20 set statusbar
visible to false
21 REPOSITION_HIDDEN_FILES_CLAUSE
24 set opts
to the icon view options
of container
window
26 set icon size to ICON_SIZE
27 set text size to TEXT_SIZE
28 set arrangement
to not arranged
38 -- Application Link Clause
43 update without registering applications
44 -- Force saving of the size
48 set statusbar
visible to false
49 set the bounds
to {theXOrigin, theYOrigin, theBottomRightX -
10, theBottomRightY -
10}
52 update without registering applications
57 tell disk (volumeName
as string)
59 set statusbar
visible to false
60 set the bounds
to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY}
63 update without registering applications
66 --give the finder some time to write the .DS_Store file
71 repeat while ejectMe
is false
73 set waitTime
to waitTime +
1
75 if (do shell
script "[ -f " & dsStore &
" ]; echo $?") =
"0" then set ejectMe
to true
77 log
"waited " & waitTime &
" seconds for .DS_STORE to be created."