Sending keystrokes or keyboard shortcuts
It could be useful to send some keystrokes to the system (not just the Terminal window). This way one could ask SizeUp to resize/move the windows, …
Exactly. I tried doing this myself but am getting errors using appscript.
require 'appscript' t = Appscript.app('System Events')
window do
key_code 123 is left arrow -- this is a sizeup command I setup
t.key_code( 123, :using => [:option_down, :control_down, :shift_down] ) end
$ terminitor start
=> /Users/defn/.rvm/gems/ruby-1.8.7-p302@global/gems/terminitor-0.1.0/lib/terminitor/dsl.rb:10:in initialize': undefined method<<' for {}:Hash (NoMethodError)
from (eval):10:in initialize' from /Users/defn/.rvm/gems/ruby-1.8.7-p302@global/gems/terminitor-0.1.0/lib/terminitor/dsl.rb:33:ininstance_eval'
from /Users/defn/.rvm/gems/ruby-1.8.7-p302@global/gems/terminitor-0.1.0/lib/terminitor/dsl.rb:33:in `window'