Getting the path of currently selected file in Finder

Hey Duncan,

If you want to get the Unix path of a file/folder into the clipboard in Path Finder, all you have to do is Copy (Cmd-C).

If you want to use those paths in a macro then it's faster to get them with AppleScript.

------------------------------------------------------------
# Get Posix Paths of Selected Items in Path Finder
# Assign a Keyboard Maestro variable to the value.
------------------------------------------------------------
set pfSelList to missing value

tell application "Path Finder"
  set pfSelList to selection
  if pfSelList ≠ {} then
    repeat with i in pfSelList
      set (contents of i) to POSIX path of (contents of i)
    end repeat
  end if
end tell

if pfSelList ≠ missing value then
  set AppleScript's text item delimiters to linefeed
  set pfSelList to pfSelList as text
  
  tell application "Keyboard Maestro Engine"
    try
      set value of variable "myVariableName" to pfSelList
    on error
      make new variable with properties {name:"myVariableName", value:pfSelList}
    end try
  end tell
  
end if
------------------------------------------------------------

-Chris