我正在尝试创建一个iTerm2脚本,用于创建会话(通过分割),然后在新创建的会话中输入文本。如何激活新创建的会话?
tell application "iTerm"
tell current session of current window
split horizontally with default profile
end tell
-- Here is what I need help with?
set _new_session to <what goes here> of current window
tell _new_session
write text "ls"
end tell
end tell