busdriverneal
04-15-2006, 10:21 PM
back in os 9 i used a script that took exact location of my desktop icons and ran it on startup so my icons would always be in the exact same spots.. is there a way i can do this from terminal?
Mikey-San
04-16-2006, 12:51 AM
I can't think of a way to do it with the shell without osascript, but there's most likely an AppleScript on MacScripter.net that will do what you need. Search the main site and the forums [ http://bbs.applescript.net ] and see if there is. If so, you can add that script to your login items list and it'll take care of your Desktop when you log in.
busdriverneal
04-16-2006, 02:58 AM
i looked there but i cant do a search untill i get a password from them.. which i have not yet... so...
Try this:
http://lonestar.utsa.edu/llee/applescript/desktopwrap.html
busdriverneal
04-16-2006, 02:52 PM
awsome 6502.. i think that was the script writer from the old script.. nice work!
busdriverneal
04-16-2006, 04:53 PM
desktop wrap only works for 10.4.. :mad:
Gnarlodious
04-16-2006, 08:38 PM
I don't understand this discussion. Is there some reason you want to restore desktop icon positions? Is the desktop messed up when you reboot?
It would not be hard to write an Applescript for the task. This script shows you the position of file 1:
tell application "Finder"
tell desktop
every file
desktop position of item 1 of the result
end tell
end tell
You would have to write your own script, the horrors!
Mikey-San
04-16-2006, 10:06 PM
I don't understand your reply. Is there some reason you can think of that says the question is a waste of time? Isn't an automatic cleanup script useful for some environments?
[snip - baiting]
guardian34
04-16-2006, 10:42 PM
I really should be sleeping now… Fortunately (for Neal), I'm not:
Finder: Desktop Icon Position (http://bbs.applescript.net/viewtopic.php?id=16895)
busdriverneal
04-17-2006, 12:18 AM
i compiled the script but it has a problem with desktop positions..
set desktop position of item (item i of first item of theList) of desktop to (item i of second item of theList)
end try
end repeat
else
set theList to {name, desktop position} of items of desktop
gives an error:
a property cant go after this property..
so im thinking this script works in 9 but "desktop position" is called something else in os x maybe? Anyway.. thanks for looking but its just a diversion from the real problem (http://forums.macosxhints.com/showthread.php?t=54482) So thanks for helping but im more interested in everyones thoughts on that puppy!
Gnarlodious
04-17-2006, 12:29 AM
It doesn't say on the page, but you need to save the script "As Application". A simple compiled script can't remember the positions from one run to the next, so the property is missing when you rerun it.
busdriverneal
04-17-2006, 12:39 AM
i cant compile or save it. still gives the same error.
Gnarlodious
04-17-2006, 12:49 AM
I don't know why it's a problem for you, but I ran the script and it works as expected. I uploaded the script to here: RestoreDesktopIcons.dmg (http://users.rcn.com/murrayallon/RestoreDesktopIcons.dmg)
busdriverneal
04-17-2006, 12:59 AM
haha.. nice icon! well.. the .dmg works fine but once again i have the same problem.. only this time its with class dpos:
set «class dpos?of item (item i of first item of theList) of desktop to (item i of second item of theList)
end try
end repeat
else
set theList to {name, «class dpos»} of items of desktop
which you changed from the original script (and problem) so.. now when i open the script application in your image and save i get an error.. if i choose reapply then it does nothing.. no error but without a saved icon position then it really has nothing to do i assume.. fun stuff huh.. haha.. what system are you using? 10.3 or 10.4?
Gnarlodious
04-17-2006, 01:17 AM
I am using 10.4.4 and it works fine. That is strange. Maybe your Finder Script Library is corrupt. I would suggest you repair permissions, preferably while booted from the installer disk or Firewire.
It's all I can think of.
busdriverneal
04-17-2006, 01:21 AM
i am running 10.3.9 so i will bet thats the problem.. whatever the icon position is must be something different from either scripts.. anyone got a cluse as to what the phrase would be?
Gnarlodious
04-17-2006, 01:27 AM
Yes indeed, icon position property was not available until 10.4.
guardian34
04-17-2006, 09:01 AM
Yes indeed, icon position property was not available until 10.4.
Which is probably why that other application also requires v10.4.
It doesn't say on the page, but you need to save the script "As Application".
Actually, it works fine as a script run from the script menu. However, I would expect most people would rather use it as an application.
Gnarlodious
04-17-2006, 10:58 AM
Hey, that is pretty amazing! Properties are now remembered by compiled scripts too! Wonder whan that started?
guardian34
04-17-2006, 12:09 PM
Properties are now remembered by compiled scripts too! Wonder whan that started?
That's how it supposed to work. Personally, I've never had problems with it, but some people have reported problems with that when running scripts from the script menu. However, this was reportedly fixed in OS X v10.4.6.
http://docs.info.apple.com/article.html?artnum=303411
[quote]Addresses several AppleScript issues, including: Preservation of property values in Script Menu, …[/url]