Re: Can't get finder selection
Re: Can't get finder selection
- Subject: Re: Can't get finder selection
- From: Luther Fuller <email@hidden>
- Date: Mon, 21 Jan 2008 09:39:15 -0600
Only a folder window can have a selection. There are Finder windows
that are not folder windows, for example, an Info window. The
following will beep only if the front window is a folder window. If
the front window is an Info window, there will be no beep.
tell application "Finder"
try
set frontRef to (target of front window) as alias
beep -- do your stuff here
on error
end try
end tell
On Jan 21, 2008, at 9:20 AM, Robert Poland wrote:
I have a script that used to work with Tiger. Now with Leopard
there are several problems. The first one is ;
When I run the script below I get the error;
Finder got an error: Can't get selection of Finder
window id 66.
Also I'm not sure if the "set x" will work as stated, can't get
that far.
--******
tell application "Finder"
if exists Finder window 1 then -- make sure there is a window
set wdw to Finder window 1
tell wdw
if selection is not {} then
set x to selection as list
end if
end tell
end if
end tell
--***
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden