![]() ![]() Open a Finder window and optionally select an item.Make sure the macro and its containing group are activated.If your expectations are different, I recommend to first try one of the other scripts available (see links above). Note: The behavior as outlined above is exactly what I personally expect from my Terminal script. No Finder window: open new Terminal window at $HOME.“Recents” or Spotlight Search): open new Terminal window at $HOME Nothing is selected and frontmost Finder window is unsuitable (e.g.Nothing is selected: open new Terminal window at the frontmost Finder window’s folder.A non-folder file is selected: open new Terminal window at the containing folder.A folder is selected: open new Terminal window at the folder.“Selected” means ‘selected in the frontmost Finder window’. New Terminal Here.kmmacros (2.6 KB) How it works Set targetDir to path to home folder as aliasĭo shell script "open -b" & space & myTerminal & space & quoted form of (POSIX path of targetDir) ![]() Set targetDir to target of Finder window 1 as alias Set targetDir to parent of targetDir as alias If kind of targetDir is not in folderLike then Set targetDir to item -1 of targetDir as alias # Examples: "Application", "Bundle", "Rich Text Document with Attachments", … # Items that should be treated as folders There are many “Open Terminal Here”, “New Terminal Here” or “Open Terminal at Finder Window” scripts floating around, also on this forum ( 1, 2, 3, …).īut none of them does exactly what I want, so here’s another script/macro: use AppleScript version "2.4" - Yosemite (10.10) or later ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |