Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Enthusiast Zone > Classic Macs and Mac OS > AppleScript to sort disks/partitions on desktop

AppleScript to sort disks/partitions on desktop
Thread Tools
Rob Huigsloot
Fresh-Faced Recruit
Join Date: May 1999
Location: The Netherlands
Status: Offline
Reply With Quote
Oct 26, 1999, 02:20 PM
 
Would someone please be so kind to fix the script below. It workes fine in OS8 but with OS9 it give me an error on : set the position of disk DiskName of desktop to item i of DiskLocations.

Thanks it advance

--Begin AppleScript
property DiskNames : {}
property DiskLocations : {}

if DiskNames is {} then -- first time, initialize
--capture current values to persistent property variables
tell application "Finder"
set DiskNames to the name of every disk of the desktop
set DiskLocations to the position of every disk of the desktop
end tell
else
--set positions from retained values
repeat with i from 1 to number of DiskNames
set DiskName to item i of DiskNames
tell application "Finder"
if disk DiskName of desktop exists then --present now?
set the position of disk DiskName of desktop to item i of DiskLocations
end if
end tell
end repeat
end if
--End AppleScript
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:05 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,