- java.lang.Object
-
- util.misc.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 secondsAppleScriptRunner(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 AppleScriptsjava.lang.String
formatTextAsParam(java.lang.String string)
Formats a string and escapes all problematic characters
-
-
-
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
-
-