damn - I would have done "tell app finder to empty trash"
It doesn't appear to work here - it claims my trash is empty. (there is some stuff in the trash in my home dir on the local volume 'wideboy' and in the remote volume 'diggory'.)
Perhaps the trash isn't always kept in a folder called 'Trashes' - e.g. the volume 'diggory' appears to keep its trash in a dir called '.Trash'
Code:
-rw-r--r-- 1 diggory diggory 15364 Jul 3 22:15 .DS_Store
drwx------ 13 diggory diggory 398 Jul 8 15:07 .Trash
-rw------- 1 diggory diggory 0 Apr 28 23:49 .Xauthority
[php]
tell current application
current date
date "Saturday, July 9, 2005 11:36:31"
path to home folder
alias "WideBoy:Users:diggory:"
list disks
{"WideBoy", "diggory", "Network", "G4160"}
(*checking for trash in WideBoy*)
do shell script "echo $UID"
"501"
(*Error: -43. File WideBoy:.Trashes:501 wasn't found.*)
(*checking for trash in diggory*)
do shell script "echo $UID"
"501"
(*Error: -43. File diggory:.Trashes:501 wasn't found.*)
(*checking for trash in Network*)
do shell script "echo $UID"
"501"
(*Error: -43. File Network:.Trashes:501 wasn't found.*)
(*checking for trash in G4160*)
do shell script "echo $UID"
"501"
(*GetTrashContents, G4160:.Trashes:501:*)
list folder alias "G4160:.Trashes:501:"
{}
(*found 0 files in this trash*)
display dialog "Trash currently contains no items" buttons {"Ok"} default button 1
{button returned:"Ok"}
end tell
[/php]