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


«Finds the oldest object in Frontier.root
«visits every cell in your "people" table looking for the oldest one
«only "big" things like outlines, scripts and table remember when they were created
«for "small" things like strings and numbers, timeCreated returns 0
«remember, press cmd-period to kill the script
on visitRoutine (adr) «called once for every cell in the database
created = timeCreated (adr)
if kb.optionKey ()
window.msg (nameOf (adr^)) «show the object's name, if the option key is down
rollBeachBall ()
if created [not equal] 0 «it's a "big" thing
if created < earliest «it's the current oldest thing
earliest = created «remember when it was created
oldestCell = adr «remember where it was
msg (nameOf (adr^) + " created on " + created)
earliest = date ("Jan 1, 1999") «the initial date to compare against
oldestCell = ""
table.visit (@people.[user.initials], @visitRoutine)
dialog.alert ("The oldest object is " + oldestCell + ".®®It was created on " + earliest + ".")

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