这是一个使用"WebStorm", "Android Studio", "Sublime Text"打开“当前finder窗口所在路径”的apple script,导出成app然后集成到finder标题栏,就可以直接在finder中打开项目啦```
set AppList to {"WebStorm", "Android Studio", "Sublime Text"}
set AppListAnswer to choose from list AppList with title "Application" with prompt "Choose an app to open this folder" default items "WebStorm"
set AppName to AppListAnswer as text
tell application "Finder"
if exists Finder window 1 then
set currentDir to (target of front Finder window) as text
if (AppName is equal to "WebStorm") then
tell application "WebStorm" to open (POSIX path of currentDir)
else if (AppName is equal to "Android Studio") then
tell application "Android Studio" to open (POSIX path of currentDir)
else if (AppName is equal to "Sublime Text") then
tell application "Sublime Text" to open (POSIX path of currentDir)
else
display dialog "cannot open with " & (AppName)
end if
end if
end tell
```
展开
RealankLiu于2018-11-07 07:21发布的图片
评论