tell application "iTerm"
repeat with aWindow in windows
... something here??? ....
end repeat
end tell
Thanks,
Osho
--
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/ddb34229-b7c6-4f1e-9892-02da77545067%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I'm not sure how to do it with Applescript, but the new Python API in 3.3.0 (now in beta) can do it pretty easily. Use "brew install python3 && pip3 install iterm2" to install the dependencies, and then run the script below:#!/usr/bin/env python3.7
import iterm2
async def main(connection):
app = await iterm2.async_get_app(connection)
desired_frame = iterm2.Frame(iterm2.Point(0, 0), iterm2.Size(1024, 768))
for window in app.terminal_windows:
await window.async_set_frame(desired_frame)
iterm2.run_until_complete(main)You'll need to set the size and origin to fit your screen. If you want to discover it automatically, you can do that using PyObjC (pip3 install pyobjc) to get the visibleFrame of the NSScreen.mainScreen.
On Thu, Jul 11, 2019 at 2:29 PM Osho <osh...@gmail.com> wrote:
Could someone please help how can I create an AppleScript to tell iTerm to move all windows to the main screen (where the MacOS main bar at the top is) and maximize all iTerm windows?--Perhaps something along this line?tell application "iTerm"
repeat with aWindow in windows
... something here??? ....
end repeat
end tell
Thanks,
Osho
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-...@googlegroups.com.
tell application "iTerm2"
set columns of current session of current window to 100
end tell