Problem getting position of desktop items
Problem getting position of desktop items
- Subject: Problem getting position of desktop items
- From: Allen Watson <email@hidden>
- Date: Tue, 20 Jul 2004 15:41:25 -0700
I've been experimenting with Late Night Software's XML Tools. They come with
example scripts for saving and restoring the position of desktop items. I
presume this worked in OS 9, but it does not in OS X.
First of all, the Save Desktop script errors out almost at once, after
prompting for the file name, saying it cannot get the class of item 1 of...
I edited the script, adding a line above the repeat loop, "set theItems to
items of desktop"; then modified the repeat statement to reference
"theItems" instead of "items of desktop". This fixed the error. (Maybe just
adding (get ...) around the phrase "items of desktop" would have done the
same.)
Then, I discovered that it saves the position info for every item on the
desktop as "-1,-1". Apparently, AppleScript for Finder cannot return
accurate positioning info about where things are on the visual desktop. If,
however, I open the Desktop folder in a Finder window, in icon view, and run
the script, it will get accurate positions for all items, and the restore
script will restore those items if moved.
I'm surmising that the real problem with the examples is not LNS's fault,
but Apple's. Apparently there is no way to get at the positioning info for
the visual construct we know as "Desktop". I think Apple should fix this.
Meanwhile, I think LNS needs to either pull the scripts or add a readme
explaining why they work for OS 9 but not for OS X, and have suggested as
much to Mark Aldritt.
--
<email@hidden>
Scripts for OE and Entourage: <
http://allenwatson.thinkaccess.net/Scripts/>
Entourage questions: <
http://www.entourage.mvps.org/>
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.