minamike
2021-08-25 11:00:42 +08:00
AppleScript 绑定快捷键,又不是不能用.jpg
```
tell application "System Events" to set frontmostProcess to first process where it is frontmost
tell application "Finder"
if exists Finder window 1 then
set currentDir to target of Finder window 1 as alias
else
set currentDir to desktop as alias
end if
end tell
set the clipboard to POSIX path of currentDir
tell application (path to frontmost application as text) to activate
delay 0.1
tell application "System Events"
keystroke "/"
delay 0.1
keystroke "v" using command down
keystroke return
end tell
```