Re: arrange icons on desktop
Re: arrange icons on desktop
- Subject: Re: arrange icons on desktop
- From: kai <email@hidden>
- Date: Thu, 17 Nov 2005 01:24:18 +0000
On 17 Nov 2005, at 00:22, Dave Lyons wrote:
On Nov 16, 2005, at 5:40 AM, kai wrote:
The main problem relates to a statement selecting the desktop
(perform action "AXRaise"), to ensure that subsequent commands
aren't performed on the wrong window.
Simulating a Command-Shift-Up keystroke will select the desktop.
(I haven't actually tried it through GUI scripting, but it should
work.)
Thanks, Dave - nice one. Now we're cookin'! :-)
Funnily enough, I'd tried Command-Shift-` (Command-Tilde) to toggle
backwards through any Finder windows - but then got bogged down
trying to determine exactly when the desktop had become selected.
(Simple enough in Tiger, but evidently more problematic on earlier
systems.) I wasn't aware of the Command-Shift-Up trick - which should
certainly help to make the code more Panther-portable.
The modified script still works fine in Tiger, so if anyone using
Panther wants to try it... (I think Yvan's probably gone to bed by
now, but no doubt he'll give it a whirl later.)
-------------------------
to |keep desktop arranged| by v
tell application "Finder" to set n to displayed name of desktop
tell application "System Events" to tell process "Finder"
set frontmost to true
key code 126 using {command down, shift down}
tell (first window whose subrole is "AXFloatingWindow" and name is n)
if not (exists) then keystroke "j" using command down
tell checkbox 3
repeat until exists
delay 0.1
end repeat
if value is 0 then click
repeat while value is 0
delay 0.1
end repeat
end tell
tell pop up button 1 to if value is not v then
click
click menu item v of menu 1
end if
end tell
keystroke "j" using command down
end tell
end |keep desktop arranged|
|keep desktop arranged| by "Kind" (* as defined in View Options *)
-------------------------
---
kai
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden