Opening new Terminal.app window/tab with a certain profile from command-line or AppleScript?

Solution 1:

Possible I am missing the point, but can't you Export the profile as a .terminal file and add that to your Login Items?

Export:

enter image description here

Add the exported file to Login Items:

enter image description here

Solution 2:

Can you just run the startup command with do script?

tell application "Terminal"
    do script "emacs"
    set current settings of selected tab of window 1 to settings set "Grass"
end tell

If someone else doesn't need to run any startup command, you can use do script "" to open a new window:

tell application "Terminal"
    do script ""
    set current settings of selected tab of window 1 to settings set "Grass"
end tell

Or you could also use do script "" when changing default settings:

tell application "Terminal"
    set old to default settings
    set default settings to settings set "Grass"
    do script ""
    set default settings to old
    activate
end tell