I have an apple script like this
#!/bin/zsh
tell application "iTerm"
activate
select first window
# Create new tab
tell current window
create tab with default profile
end tell
# Split pane
tell current session of current window
split vertically with default profile
split vertically with default profile
split vertically with default profile
end tell
# Exec commands
tell first session of current tab of current window
write text "aws-vault exec my-role -d 12h --no-session"
write text "start him"
end tell
tell second session of current tab of current window
write text "start her"
end tell
tell third session of current tab of current window
write text "start you"
end tell
tell fourth session of current tab of current window
write text "start me"
end tell
end tell
the problem is the script doesn't wait for me to fill in the mfa information from aws command. I've also tried aws-command; start him
but that just exits and doesn't execute start him
at all. Anyone run into this before?