3 ms·
I can AppleScript to Finder on the toolbar and do some pretty nice stuff. For example, the script to add a button to open a terminal in the directory the window
by protomyth 4y ago
I can AppleScript to Finder on the toolbar and do some pretty nice stuff. For example, the script to add a button to open a terminal in the directory the window is showing is trivial.
- Affric 4y agoWould you be willing to share such a script? 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 :)
- protomyth 4y agoWell, Affric you seem to have done something, so here is the code: 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.