Mac(一):Mac脚本编辑器 - AppleScript实现打开终端并执行打开Android模拟器的命令

废话不多说,直接上才艺

tell application "iTerm"
	activate
	create window with default profile command "~/Library/Android/sdk/emulator/emulator @AVD"
end tell
tell application "Terminal"
	activate
	do script "~/Library/Android/sdk/emulator/emulator @AVD"
end tell
// 会打开两个窗口(一个默认打开的,一个窗口1)
tell application "Terminal"
	activate
	tell window 1
		activate
		do script "~/Library/Android/sdk/emulator/emulator @AVD"
	end tell
end tell

猜你喜欢

转载自blog.csdn.net/weixin_43526371/article/details/120545953