I’d like to create a script that moves icons on the desktop. Well, I wouldn’t like to, I’m getting paid to create an advanced version of this script, but all the ideas and all the components come down to this critical point of actually being able to modify the “x” and “y” positions of the icons of the desktop. This may sound like a rather n00bish thing to ask, but I really just don’t know the command-and when it comes down to programming, you can be programming for 30 years, but if you don’t know the one command, you’re stuck with doing random things like opening the .ds_store files and forcing the program to edit the hex in the file…
Did I say that out loud?
So, essentially, I just really need help, and I feel bad that this is my first post, but regardless…
tell application "Finder"
set desktop position of every disk of desktop to {100, 200} -- (x, y)
end tell
but this will result a crush of icons at the same place
storing the desktop postion into a variable makes it possible to restore the position later
tell application "Finder"
set pos to desktop position of disk 1 of desktop
set desktop position of disk 1 of desktop to {100, 200}
delay 5
set desktop position of disk 1 of desktop to pos
end tell
Model: G5 dual 2,5 GHz
Browser: Safari 419.3
Operating System: Mac OS X (10.4)
set itemXY to (desktop position of every item of desktop)
I just made it a list, and the next lines write it to a text file, which I can use from then on.
I just need a way to return the current desktop resolution, just to be proper, to be fair, I could just set their x values to +1,000,000,000 but it’s proper programming to do it the right way, I think.
Fell free to adapt the script as you like. I don’t believe in copyright for scripts, and a lot of what I wrote is based on bits I’ve found around the place anyway. Just might save you a lot of work.