Created
June 2, 2011 19:07
-
-
Save danielwestendorf/1005066 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
framework 'Foundation' | |
framework 'ScriptingBridge' | |
terminal = SBApplication.applicationWithBundleIdentifier("com.apple.terminal") | |
load_bridge_support_file 'Terminal.bridgesupport' #load the bridge support file | |
new_tab = terminal.classForScriptingClass("tab").alloc #create a new tab instance | |
terminal.windows.first.tabs.addObject(new_tab) #add the tab to the first window | |
--> RuntimeError: NSInvalidArgumentException: *** -[SBElementArray addObject:]: can't add an object that already exists. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hacking with macruby is brutal and awesome.
No problem! If you're interested checkout my Mynu gem, I recently expanded it with some basic terminal support:
https://github.com/RobertLowe/mynu/blob/master/examples/terminal.rb
https://github.com/RobertLowe/mynu/blob/master/lib/mynu/support/terminal.rb