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
用AppleScript打开工程
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 现在Xcode随着MacOS系统的升级也在不断的上升,现在最新版本已经是10.1了Snip20181221_35....
- 在Xcode7.3新建的工程,在Xcode8.0上运行后,重新在Xcode7.3上运行爆红提示如下:The doc...