• 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
wrong result when trying to get Selection from finder window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

wrong result when trying to get Selection from finder window


  • Subject: wrong result when trying to get Selection from finder window
  • From: Ronald Hofmann <email@hidden>
  • Date: Fri, 02 Nov 2012 10:27:21 +0100

I have the following in Mountain Lion and this only happens when opening a folder from the desktop or another space.

Here's how to duplicate:
• Close all finder windows.
• Open any folder on the desktop, a new finder window will appear. Select any file in that finder window by clicking on it once.
• Open your AppleScript Editor and run the following script:

tell application "Finder"
return selection
end tell

The script will return only the path to the folder on the desktop, not the selected files in the finder window.

Any clues how to get the correct result?

I also tried this without success:

tell application "System Events"
tell application "Finder"
set theList to selection


set theText to ""
repeat with myItem in theList
set theText to theText & POSIX path of (myItem as text) & "\n"
end repeat


return theText


end tell
end tell


Greetings from Switzerland, Ronald Hofmann
---
 _______________________________________________
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: wrong result when trying to get Selection from finder window
      • From: Brian Christmas <email@hidden>
    • Re: wrong result when trying to get Selection from finder window
      • From: Axel Luttgens <email@hidden>
    • Re: wrong result when trying to get Selection from finder window
      • From: Christopher Stone <email@hidden>
  • Prev by Date: Re: Saving to array list
  • Next by Date: Re: wrong result when trying to get Selection from finder window
  • Previous by thread: Re: Mail navigation script
  • Next by thread: Re: wrong result when trying to get Selection from finder window
  • Index(es):
    • Date
    • Thread