Make sure applescript still works with new preferences
By geor...@google.com on August 30, 2010 18:49 (imported from Google Code)
Test with this script:
-- Startup AppleScript for iTerm, initializing the windows/tabs.
tell application "iTerm"
activate
-- Create a new terminal window...
set myterm to (make new terminal)
-- ... and go on within this one.
tell myterm
-- Set the terminal size constraints.
set number of columns to 216
set number of rows to 53
-- Array/List which will hold all our sessions (empty
-- by default OFC).
set sessionList to {}
-- Create a few blank new sessions (will be replaced by
-- automatic calculations later, so that we'll have a
-- nice bar full with new tabs.)
repeat with i from 1 to 2 by 1
set end of sessionList to (make new session at the end of sessions)
end repeat
-- Within those created sessions, load the default
-- profiles (for now, will be replaced later with
-- different profiles/commands.)
repeat with i from 1 to (count sessionList) by 1
tell item i of sessionList
-- This doesn't work, as "session x of
-- terminal y doesn't
-- understand the launch message".
launch session "Default"
end tell
end repeat
-- DEBUG: print the session list.
return sessionList
end tell
-- set the bounds of the first window to {w, x, y, z}
end tell