• 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: Can't get finder selection
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Can't get finder selection


  • Subject: Re: Can't get finder selection
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 21 Jan 2008 16:49:44 +0100

On 21/01/08 16:20, Robert Poland wrote:

Wizards,

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
--******


Hello Bob,

Are you sure the above worked with Tiger?
"selection" is a Finder's property, not a property of a Finder's window.
Perhaps did you mean something like this:

   tell app "finder"
       set x to selection as alias list
   end

HTH,
Axel
_______________________________________________
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
  • Follow-Ups:
    • Re: Can't get finder selection
      • From: KOENIG Yvan <email@hidden>
References: 
 >Can't get finder selection (From: Robert Poland <email@hidden>)

  • Prev by Date: Re: Can't get finder selection
  • Next by Date: Re: How to parse CSV
  • Previous by thread: Re: Can't get finder selection
  • Next by thread: Re: Can't get finder selection
  • Index(es):
    • Date
    • Thread