Module tvbrowser
Package util.misc

Class AppleScriptRunner


  • public class AppleScriptRunner
    extends java.lang.Object
    This class is the Interface to the AppleScript-System. It runs the Scripts
    Since:
    2.2.1
    Author:
    bodum
    • Constructor Summary

      Constructors 
      Constructor Description
      AppleScriptRunner()
      Creates the Runner with a default Timeout of 60 seconds
      AppleScriptRunner​(int timeout)
      Create the Runner
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String executeScript​(java.lang.String script)
      Executes the AppleScripts
      java.lang.String formatTextAsParam​(java.lang.String string)
      Formats a string and escapes all problematic characters
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AppleScriptRunner

        public AppleScriptRunner()
        Creates the Runner with a default Timeout of 60 seconds
      • AppleScriptRunner

        public AppleScriptRunner​(int timeout)
        Create the Runner
        Parameters:
        timeout - Timeout in Seconds for the execution of the Scripts
    • Method Detail

      • executeScript

        public java.lang.String executeScript​(java.lang.String script)
                                       throws java.io.IOException
        Executes the AppleScripts
        Parameters:
        script - Script to execute
        Returns:
        Output if exec was successful, null if Error occurred
        Throws:
        java.io.IOException - Thrown if an IO operation went wrong.
      • formatTextAsParam

        public java.lang.String formatTextAsParam​(java.lang.String string)
        Formats a string and escapes all problematic characters
        Parameters:
        string - Input-String
        Returns:
        string with escaped characters