by protomyth · 4y ago · 0 comments
tell application "Finder"
set myWin to window 1
set thePath to (POSIX path of (target of myWin as alias))
set thePath to (quoted form of POSIX path of (target of myWin as alias))
tell application "Terminal"
activate
tell window 1
do script "cd " & thePath
end tell
end tell
end tell
You use it to create an application and then change the icon to something appropriate.I found this example code from 2008 for an up button on the apple website:
`tell application "Finder" set the target of Finder window 1 to (container of target of Finder window 1) end tell`
But I am getting an error on modern OSX... I would be interested to see how your button works :)