获得徽章 0
iOS Developer @UCar inc
赞了这篇沸点
写点东西可真不容易。
一颗香菜于2018-11-14 11:28发布的图片
一颗香菜于2018-11-14 11:28发布的图片
4
iOS Developer @UCar inc
在Mac的Finder中,想增加一个txt或者markdown挺痛苦的,很多同学通过shell解决,给大家提供一个apple script, 将它保存成app,然后放到finder状态栏,就可以直接在当前finder路径添加txt了,而且文件名还可以自己设置😊

set userResonse to text returned of (display dialog "输入新建的文本文件名" default answer "new file.txt" buttons {"取消", "确认"} default button "确认")

tell application "Finder"
if exists Finder window 1 then
make new file at (target of front Finder window as text) with properties {name:userResonse}
else
make new file at (path to desktop) with properties {name:userResonse}
end if
end tell
展开
RealankLiu于2018-11-07 15:50发布的图片
5
iOS Developer @UCar inc
iOS Developer @UCar inc
iOS Developer @UCar inc
赞了这篇沸点
这是一个使用"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 15:21发布的图片
评论
iOS Developer @UCar inc
iOS Developer @UCar inc
iOS Developer @UCar inc
iOS Developer @UCar inc
个人成就
文章被点赞 411
文章被阅读 107,383
掘力值 2,239
收藏集
2
关注标签
4
加入于