Part of the Samples Website. 8/16/97.


«Re-arranges the icons in the sub-folders of the Frontier folder
«this script cleans things up so they look neat
local (hdist = 100, vdist = 50)
local (ctperline = 3)
on dofolder (folder)
local (f, h = 0, v = 0, ct = 0)
on bumppos ()
if ct >= ctperline «wrap around to next line
h = 0
v = v + vdist
ct = 0
h = h + hdist
rollBeachBall ()
on setpos ()
if file.isVisible (f) «only count visible files
file.setIconPos (f, h, v)
bumppos ()
fileloop (f in folder) «do files first
if not file.isFolder (f)
setpos ()
fileloop (f in folder) «do folders second
if file.isFolder (f)
setpos ()
fileloop (f in folder) «dive into each folder
if file.isFolder (f)
dofolder (f)
«magic incantations to the Finder
Finder.changeView (folder, Finder.view.byIcon)
Finder.zoomWindow (folder, false)
Finder.close (folder)
dofolder (Frontier.pathString)

This page was last built on Sat, Aug 16, 1997 at 6:36:49 PM. You can download the current set of sample scripts from our FTP site. Dave