In my old scripts, I was doing things like this:
It appears like it's the make new session that's causing the problem. So I changed the set theSession... and tell theSession... lines to use a launch instead. The result:tell application "iTerm"
activate
set theTerm to make new terminal
tell theTerm
set theSession to make new session at the end of sessions
tell theSession to
exec command "/bin/bash -login"
write text "ls"
end tell
end tell
end tell
Not only does that not crash for me anymore, but it seems to be a bit faster (my imagination?).tell application "iTerm"
activate
set theTerm to make new terminal
tell theTerm
launch session "Default Session"
tell the last session
exec command "/bin/bash -login"
write text "ls"
end tell
end tell
end tell
No comments:
Post a Comment