Eventually aborting the application and throwing the following error :
lib/rb-scpt.rb:542:in _send_command': CommandError (Appscript::CommandError) OSERROR: -1719 MESSAGE: Access for assistive devices is disabled. OFFENDING OBJECT: app("/System/Library/CoreServices/System Events.app").processes["iTerm2"].menu_bars[1] COMMAND: app("/System/Library/CoreServices/System Events.app").processes["iTerm2"].menu_bars[1].menu_bar_items["Window"].menus["Window"].menu_items["Select Split Pane"].menus["Select Split Pane"].menu_items["Select Pane Left"].click() from /Users/carlo/.gem/ruby/2.0.0/gems/rb-scpt-1.0.1/lib/rb-scpt.rb:642:inmethod_missing'
from /Users/carlo/src/i2cssh/lib/i2cssh.rb:103:in block (2 levels) in split_session' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:102:inupto'
from /Users/carlo/src/i2cssh/lib/i2cssh.rb:102:in block in split_session' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:101:inupto'
from /Users/carlo/src/i2cssh/lib/i2cssh.rb:101:in split_session' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:26:ininitialize'
from ./i2cssh:302:in new' from ./i2cssh:302:in'
At least on Sierra, a system pop up will spawn asking for authorization to enable UI and showing iTerm in the list of applications that requested "UI" access.
Once that is enabled the following Applescript would return true :
tell application "System Events"
set GUIScriptingEnabled to (UI elements enabled)
return GUIScriptingEnabled
end tell
As an alternative, using instead Keys (as done in csshX) should allow for this to run without the need for "UI special access", which is restricted for Security reasons
Eventually aborting the application and throwing the following error :
lib/rb-scpt.rb:542:in'
_send_command': CommandError (Appscript::CommandError) OSERROR: -1719 MESSAGE: Access for assistive devices is disabled. OFFENDING OBJECT: app("/System/Library/CoreServices/System Events.app").processes["iTerm2"].menu_bars[1] COMMAND: app("/System/Library/CoreServices/System Events.app").processes["iTerm2"].menu_bars[1].menu_bar_items["Window"].menus["Window"].menu_items["Select Split Pane"].menus["Select Split Pane"].menu_items["Select Pane Left"].click() from /Users/carlo/.gem/ruby/2.0.0/gems/rb-scpt-1.0.1/lib/rb-scpt.rb:642:in
method_missing' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:103:inblock (2 levels) in split_session' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:102:in
upto' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:102:inblock in split_session' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:101:in
upto' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:101:insplit_session' from /Users/carlo/src/i2cssh/lib/i2cssh.rb:26:in
initialize' from ./i2cssh:302:innew' from ./i2cssh:302:in
At least on Sierra, a system pop up will spawn asking for authorization to enable UI and showing iTerm in the list of applications that requested "UI" access.
Once that is enabled the following Applescript would return true :
tell application "System Events" set GUIScriptingEnabled to (UI elements enabled) return GUIScriptingEnabled end tell
As an alternative, using instead Keys (as done in csshX) should allow for this to run without the need for "UI special access", which is restricted for Security reasons