You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tell application "iTerm2"set newWindow to (create window with default profile)
tell current session of newWindow
write text "echo it works!"
end tell
end tell
CurrentWindow.scpt
tell application "iTerm2"
tell current session of current window
write text "echo it works!"
end tell
end tell
splitSplitSPLIT.scpt
tell application "iTerm2"set newWindow to (create window with default profile)
tell current session of newWindow
write text "echo it works!"
repeat 12 times -- 12 splits = 13 total
split horizontally with default profile
end repeat
end tell
end tell
CommandsInSeparateTabs.scpt
tell application "iTerm2"set newWindow to (create window with default profile)
tell current session of newWindow
write text "echo 'All wings report in'"set red1 to (split horizontally with default profile)
tell red1
write text "echo 'red1 reporting in'"
end tell
set red2 to (split horizontally with default profile)
tell red2
write text "echo 'red2 reporting in'"
end tell
end tell
end tell
List of commands, 1 tab
set commandList to { "echo '1'", "echo '2'", "echo '3'" }
tell application "iTerm2"
set newWindow to (create window with default profile)
tell current session of newWindow
repeat with c in commandList
write text c
end repeat
end tell
end tell
List of commands, many tabs
set commands to {"echo '1'", "echo 2","echo '3'"}
tell application "iTerm2"
create window with profile "Default"
set original_window to current window
-- create tabs
repeat with i from 1 to count of commands
tell current session of current window
split horizontally with profile "Default"
end tell
end repeat
-- run commands in tabs
repeat with i from 1 to count of commands
tell session i of current tab of current window
write text (item i of commands)
end tell
end repeat
-- get last tab
tell current tab of current window
set _new_session to last item of sessions
end tell
-- select last tab
tell _new_session
select
end tell
-- or select all tabs (cmd+shift+i)
tell application "System Events" to keystroke "I" using {shift down, command down}
end tell
Send commands to other apps.scpt
tell application "Safari"
make new document with properties {URL:"http://stackoverflow.com/admin.PHP"}
end tell
say "WeeeeeeEeeeee"