I had an AppleScript that would do this in OS 9, but in OS X I can’t seem to get Finder affect the desktop.
How are you referencing the Desktop?
Remember, Mac OS X is a multi-user environment. Consequently there are multiple desktop folders.
/Desktop is the common desktop, holding items all users see.
~/Desktop (typically /Users//Desktop ) the the individual user’s desktop.
It may be that you’re pointing to one of them but the files you’re after are in the other.
Care to post a code snippet? It might help.
This is the script I used in OS 9 to reset my desktop icons.
tell application “Finder”
activate
select startup disk
set position of selection to {1089, 28}
select folder “powerbook stuff”
set position of selection to {1089, 490}
select folder “lindsey stuff”
set position of selection to {1089, 556}
select folder “current projects”
set position of selection to {1089, 622}
select trash
set position of selection to {1089, 688}
end tell
I’ve experimented with a similar script for OS X, but there’s something about the syntax of selecting my personal desktop that I don’t understand:
(select) / Users / isolde / desktop
tell application “Finder”
position of every item
end tell