Created
February 8, 2023 06:47
-
-
Save kawaz/e8d63544d70381b41dfd85c89653958e to your computer and use it in GitHub Desktop.
Finderでファイルを選択状態にするスクリプト。複数も可。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/swift | |
import AppKit | |
let urls = CommandLine.arguments.dropFirst(1).map { URL(fileURLWithPath: $0) } | |
NSWorkspace.shared.activateFileViewerSelecting(urls) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
使い方はこんな感じで超シンプル。
で、↓こんな感じに Finder 上のファイルが選択状態になってくれる。
こんな動作になるようだ。