Re: Finder GUI Scripting
Re: Finder GUI Scripting
- Subject: Re: Finder GUI Scripting
- From: kai <email@hidden>
- Date: Mon, 1 Aug 2005 21:40:14 +0100
On 1 Aug 2005, at 15:44, Vincent Claudic wrote:
Does someone already tried the following which was working on 10.3 ?
tell application "Finder"
activate
set current view of Finder window frontmost to list view
if zoomed of Finder window frontmost is false then
set zoomed of Finder window frontmost to true
end if
end tell
This has been raised before, Vincent - under the subject heading:
"Zoomed window bug in Tiger?" This link should find most of the
previous discussion:
http://tinyurl.com/cakdb
I don't think there's much doubt that this behaviour is down to a bug
- especially since the zoomed property of a Finder window can be set
to false, but not to true. For the moment, I'd a suggest a workaround
something like this (which should allow a script to continue to
function once a fix is implemented):
----------------
tell application "Finder"
if (count Finder windows) is 0 then return
activate
tell front Finder window
if current view is not list view then ¬
set current view to list view
try
if not zoomed then set zoomed to true
on error number -10000 (* errAEEventFailed *)
tell application "System Events" to ¬
tell process "Finder" to tell front window to ¬
click (first button whose description is "zoom
button")
end try
end tell
end tell
----------------
(Since I believe the 'frontmost' property applies to either an
application or a process, rather than a window, I've replaced it here
with 'front'.)
---
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