Using this script filter:
tell application "Finder"
set windowList to windows
set resultList to {}
repeat with i from 1 to count of windowList
set windowItem to item i of windowList
set windowName to name of target of windowItem
set windowPath to POSIX path of (target of windowItem as alias)
set end of resultList to {windowName, windowPath}
end repeat
end tell
set output to ""
repeat with i from 1 to count of resultList
set windowItem to item i of resultList
set windowName to item 1 of windowItem
set windowPath to item 2 of windowItem
set output to output & "{ \"uid\": \"" & i & "\", \"title\": \"" & windowName & "\", \"arg\": \"" & windowPath & "\" },"
end repeat
if output is not "" then
set output to text 1 thru -2 of output
end if
set alfredJSON to "{ \"items\": [" & output & "] }"
return alfredJSON
Running to bash script
echo "$1"
Connected to "save current clipboard" in paul's script to select from open finder windows. Really liking the functionality of this, thanks for bringing it back Paul.