• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Problem getting position of desktop items
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem getting position of desktop items


  • Subject: Re: Problem getting position of desktop items
  • From: Bernard Azancot <email@hidden>
  • Date: Fri, 23 Jul 2004 07:11:33 +0200

Hi,

I have tried this script, but got an error 1 message with the following code selection:
--
do shell script "defaults read /Library/Preferences/com.apple.windowserver | grep -w Width"
--
What's the problem ?
What is "defaults read " ?

Yours,

Bernard

Le 22 juil. 04, ` 22:41, Paul Skinner <email@hidden> a icrit :

This may be well-known and simply disliked, but you can hack around
this deficiency. Sort of.

tell application "Finder"
activate
set s to {(word 3 of (do shell script "defaults read
/Library/Preferences/com.apple.windowserver | grep -w Width")) as
number, (word 3 of (do shell script "defaults read
/Library/Preferences/com.apple.windowserver | grep -w Height")) as
number} --------------------------------------------------
open (path to desktop folder from user domain)
set dp to desktop picture
tell Finder window "Desktop"
set current view to icon view
set collapsed to false
set toolbar visible to false
set the bounds of it to {0, 22, (item 1 of s) + 15, (item 2 of s)}
end tell

set itemList to (every item of the desktop)
set positionList to (position of every item of the desktop)
repeat with thisItem in itemList
set the position of thisItem to {(item 1 of s) / 2, (item 2 of s) / 2}
delay 0.2
end repeat
repeat with i from 1 to length of itemList
set the position of item i of itemList to item i of positionList
delay 0.2
end repeat
end tell


Paul
_______________________________________________
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.


  • Follow-Ups:
    • Re: Problem getting position of desktop items
      • From: Paul Skinner <email@hidden>
  • Prev by Date: Converting wmv files to mpeg or Quictime on a Mac
  • Next by Date: keystrokes - problem with german umlauts - any idea?
  • Previous by thread: Re: Problem getting position of desktop items
  • Next by thread: Re: Problem getting position of desktop items
  • Index(es):
    • Date
    • Thread