lib/webconsole/lib/window.rb in webconsole-0.1.5 vs lib/webconsole/lib/window.rb in webconsole-0.1.10
- old
+ new
@@ -38,10 +38,15 @@
DOJAVASCRIPT_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, "do_javascript.scpt")
def do_javascript(javascript)
WebConsole::run_applescript(DOJAVASCRIPT_SCRIPT, [javascript, window_id])
end
+ READ_FROM_STANDARD_INPUT_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, "read_from_standard_input.scpt")
+ def read_from_standard_input(text)
+ WebConsole::run_applescript(READ_FROM_STANDARD_INPUT_SCRIPT, [text, window_id])
+ end
+
CLOSEWINDOW_SCRIPT = File.join(APPLESCRIPT_DIRECTORY, "close_window.scpt")
def close
WebConsole::run_applescript(CLOSEWINDOW_SCRIPT, [window_id])
end
@@ -57,6 +62,6 @@
def self.window_id_from_result(result)
return result.split.last.to_i
end
end
-end
\ No newline at end of file
+end