首页 > 移动平台 > 详细

命令行 apple script 操控 iTerm2

时间:2019-01-15 23:21:04      阅读:183      评论:0      收藏:0      [点我收藏+]

参考链接:https://www.iterm2.com/documentation-scripting.html

下面的命令:打开 iterm2, 并且 运行命令 "tail -f /Users/ruby/index.html",然后进入全屏模式

tell application "iTerm"
	activate
	create window with default profile command "tail -f /Users/ruby/index.html"
end tell

tell application "System Events"
	tell process "iTerm2"
		key down command
		keystroke return
		key up command
	end tell
end tell

  

系统样例(打开 Script Editor 然后看右上角)

技术分享图片

 

其他资料:

AppleScript 官方文档:https://www.iterm2.com/documentation-scripting.html

 

命令行 apple script 操控 iTerm2

原文:https://www.cnblogs.com/eleven24/p/10274757.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!