I can't speak to PF8, but this script will open the item selected in the Finder in a PF7 window:
tell application "Finder"
set finderSelectionList to selection as alias list
if length of finderSelectionList = 0 then error "No files were selected in the Finder!"
set fileAlias to item 1 of finderSelectionList
end tell
tell application "Path Finder"
activate
select fileAlias
end tell
I am trying to build a Macro thats the reverse of this one, but the below script isn't working.
tell application "Path Finder"
set pathfinderSelectionList to selection as alias list
if length of pathfinderSelectionList = 0 then error "No files were selected in the Pathfinder!"
set fileAlias to item 1 of pathfinderSelectionList
end tell
tell application "Finder"
activate
select fileAlias
end tell
property ptyScriptName : "Reveal PathFinder Item in New Finder Tab"
property ptyScriptVer : "2.0"
property ptyScriptDate : "2019-06-20"
property ptyScriptAuthor : "JMichaelTX" -- based on script by Chris @ccstone
tell application "Path Finder" to ¬
set itemPath to POSIX path of item 1 of (get selection)
set itemAlias to alias POSIX file itemPath
tell application "Finder"
activate
set numWin to count of Finder windows
set createNewTab to true
if (numWin = 0) then
make new Finder window
set createNewTab to false
end if
end tell
if (createNewTab) then
tell application "System Events"
tell application process "Finder"
click menu item "New Tab" of menu "File" of menu bar 1
end tell
end tell
end if
tell application "Finder"
activate
set itemParent to parent of itemAlias as alias
if exists of window 1 then
tell window 1
set its target to itemParent
reveal itemAlias
end tell
end if
end tell
Is there a reason you can't, either directly or via KBM, use the menu item PathFinder/Services/Show in Finder instead of using a script?
Note that I am not talking about the right-click context menu item "Reveal in Finder" - that seems to still be broken as of PF 8.5.4
UPDATE: I see that the amazing JMichael came up with a script that solves your problem, so feel free to ignore my answer