Using Automator Applescript open iTerm to run adb install apk
使用 Automator[自动运行],Applescript脚本 Automator安装.apk Applescript安装.apk
使用Applescript打开iTerm2 安装apk
1、打开自动操作
2、新建快速操作
3、选择类型
4、拖入
5、粘贴这段代码
tell application "Finder"
set theFile to selection
set apkPath to POSIX path of (theFile as alias)
if application "iTerm" is running then
tell application "iTerm"
set newWindow to (create window with default profile)
tell current session of newWindow
write text "adb install -r " & apkPath
end tell
end tell
else
activate application "iTerm"
write text "adb install -r " & apkPath
end if
end tell
当然命令替换成你自己想改的也可以,不想用iTerm,可以自己换成 terminal