Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to ssh to multiple hosts in iTerm' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to ssh to multiple hosts in iTerm
Authored by: nvrmore100 on Jul 16, '07 08:32:47AM

Bookmarks are great, assuming you log into the same machines over and over. Unfortunately I log into various machines constantly (support a group of over 8000 servers), using bookmarks for this is a royal pain in the...

As for the errors, what exactly happens if it is already open? It should do essentially the same function open or closed.



[ Reply to This | # ]
An AppleScript to ssh to multiple hosts in iTerm
Authored by: JSwan on Jul 16, '07 12:41:31PM

When I execute the script using Script Editor prior to starting iTerm it works as expected. If I then close the iTerm window (including all tabs) and Run the script again it stops on the line tell term with an error of "The variable term is no defined".
I think I see what is going on. The script is expecting there to be a (current terminal) to provide a value to term in the statement "set term to (current terminal)". If no window is open in iTerm it cannot complete the set command thereby leaving term with no value. My problem is easily avoided by insuring there is an iTerm window open when the script is executed. There may also be a script command to would open one if none is open.



[ Reply to This | # ]