tell application "/Applications/iTerm.app"
activate
tell current window
set width of current session to 800 -- Set the desired width in pixels
end tell
end tell
but am getting an error "iTerm got an error: Can’t make width of current session of current window into type specifier."
Is it possible to set the iTerm2 window with a script?
tell application "iTerm2"
set current_window to current window
tell current session of current window
set new_width to 800
set current_window_bounds to bounds of current_window
set current_height to (item 4 of current_window_bounds) - (item 2 of current_window_bounds)
set bounds of current_window to {item 1 of current_window_bounds, item 2 of current_window_bounds, (item 1 of current_window_bounds) + new_width, (item 2 of current_window_bounds) + current_height}
end tell
tell application "iTerm2"
set columns of current session of current window to 100
end tell
--
You received this message because you are subscribed to the Google Groups "iterm2-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iterm2-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/iterm2-discuss/5fb6ea4f-d6fa-4ec9-bb92-4d387ca16007n%40googlegroups.com.