wrong result when trying to get Selection from finder window
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