From: Matt Mower Date: 2007-10-29T18:58:46+09:00 Subject: Re: iTerm and Ruby::OSA On 29/10/2007, has wrote: > Unlike AppleScript, which is very more forgiving of imperfect > dictionaries, RubyOSA strictly enforces the structure and content > provided by application dictionaries. As a result, any bugs or quirks > in an application's dictionary may prevent RubyOSA from accessing some > or all of that application's scripting features. Thanks Has -- it does seem like Appscript is the way to go. After some experimenting I came up with the following, that addresses my need to create a new tab in the current iTerm window and execute a command in it: require 'rubygems' require 'appscript' iterm = Appscript::app('iTerm') session = iterm.current_terminal.sessions.end.make( :new => :session ) session.exec( :command => "bash" ) session.write( :text => "echo 'Hello World'" ) Being unfamiliar with Appscript as well as AppleScript in general it took me a few tries to to go from your example to making a new session and executing a command. The key was to appreciate that Appscript follows script dictionary closely and uses the literal AppleScript parameters passed in hashes. Many thanks again for your help and suggestion of using Appscript :-) Regards, Matt -- Matt Mower :: http://matt.blogs.it/