I’m too lazy to provide a new screen snapshot today, but here in 2023, my OpenTerminalInFinderDir.scpt script appears at the bottom of a similar-looking menu on the menubar. When you combine this with enabling AppleScript in the Mac menubar (see the link below), the result looks something like this: Here in April, 2023, I named this file OpenTerminalInFinderDir.scpt, and put it in either /Library/Scripts/AlsScripts or ~/Library/Scripts/AlsScripts. When I have a Mac Finder window in the foreground and run this script from the AppleScript menu on the macOS menubar, it opens a new Mac Terminal window, and automatically places me in the same directory as the current Finder folder. Shell scripts are useful because you can combine many common tasks into one script, saving you time and possible errors when performing similar tasks over and over. You run a shell script to perform commands you might otherwise enter at the command line. Set thePath to (quoted form of POSIX path of (target of myWin as alias)) A shell script is a text file that contains one or more UNIX commands. Fortunately the script code is relatively readable. I couldn’t find any other way to do this, so I finally wrote an AppleScript script to do it. Start typing terminal in the search field. AppleScript code to open a Terminal in the current Finder folderįor a while I have wanted to be able to open a Mac Terminal window in the same directory as the Mac Finder folder that I’m currently looking at. It's the magnifying glass in the upper-right corner of the screen. Apple/macOS Terminal/Finder tip: This tutorial shows how to open a Mac Terminal window in the current Finder folder by using AppleScript. On your Mac, do one of the following: Click the Launchpad icon in the Dock, type Terminal in the search field, then click Terminal.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |