首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Applescript不运行用户命令

Applescript不运行用户命令
EN

Stack Overflow用户
提问于 2020-03-01 13:30:21
回答 1查看 66关注 0票数 0

我需要applescript来运行tabset test命令来更改iTerm当前选项卡的名称。

代码语言:javascript
复制
-- Launch iTerm and log into multiple servers using SSH
tell application "iTerm"
    activate
    create window with default profile
    set newWindow to (create window with default profile)
    set Servers to paragraphs of (do shell script "/bin/cat $HOME/serverlist")
    repeat with nextLine in Servers
        if length of nextLine is greater than 0 then
            tell current window
                create tab with default profile
                tell current session of newWindow

                    do shell script "export PATH='/usr/local/bin:$PATH'; tabset test "

                end tell
            end tell
        end if
    end repeat
    tell first tab of current window
        close
    end tell
    tell second window
        close
    end tell
end tell

问题是tabset test不工作,并且没有任何错误提示。

可以通过npm install -g iterm2-tab-set安装tabset命令

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-03-08 22:07:19

泰德·瑞格利是对的。我应该使用iTerm的write命令在窗口中键入文本。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/60472288

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档