Code Example
I am trying to call an AppleScript application from a Java program. I found this code example:
package com.devdaily.mac.applescript;
import java.io.IOException;
public class MultilineAppleScriptTest
{
public static void main(String[] args)
{
new MultilineAppleScriptTest();
}
public MultilineAppleScriptTest()
{
Runtime runtime = Runtime.getRuntime();
// an applescript command that is multiple lines long.
// just create a java string, and remember the newline characters.
String applescriptCommand = "tell app \"iTunes\"\n" +
"activate\n" +
"set sound volume to 40\n" +
"set EQ enabled to true\n" +
"play\n" +
"end tell";
String[] args = { "osascript", "-e", applescriptCommand };
try
{
Process process = runtime.exec(args);
}
catch (IOException e)
{
e.printStackTrace();
}
}
}
Problem
When searching for the package "com.devdaily.mac.applescript" it references in Eclipse for installing new software, it does not find the package or even just searching for "applescript" in general. So, this must be a one off custom package the author created. Any ideas on locating this package OR do you know of any other examples I can try that performs a similar purpose? Thank you!