Saturday, August 8, 2020

#1 2003-01-25 12:07:39 am

yin7yang64
Member
From:: Chicago
Registered: 2003-01-25
Posts: 5

Can I use AppleScript to reset items on my desktop?

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.

Offline

 

#2 2003-01-25 05:53:40 am

Camelot
Member
From:: San Jose, CA
Registered: 2002-12-15
Posts: 629

Re: Can I use AppleScript to reset items on my 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/<username>/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.

Offline

 

#3 2003-01-25 10:42:28 am

yin7yang64
Member
From:: Chicago
Registered: 2003-01-25
Posts: 5

Re: Can I use AppleScript to reset items on my desktop?

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


Filed under: Finder

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)