Hi!
I recently upgraded to OS X 10.6.
I just tried running a simple AppleScript from inside Processing, and it returns an error.
E.g. this program:
Code:/**
applescript taken from processinghacks.com/hacks:applescript
@author sojamo
*/
import com.apple.cocoa.foundation.*;
void setup() {
size(400,400);
}
void keyPressed() {
// applescript example: ask the finder so say something.
String script = "tell application \"Finder\" to say \"Hello world how are you.\"";
executeScript(script);
}
void draw() {}
void executeScript(String script) {
NSAppleScript myScript = new NSAppleScript(script);
NSMutableDictionary errors = new NSMutableDictionary();
myScript.execute(errors);
}
spits out an error
Code:[Deprecated] CocoaJava: com.apple.cocoa.foundation.NSAppleScript
NSRuntime.loadLibrary(/usr/lib/java/libObjCJava.dylib) error.
java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/java/libObjCJava.dylib
at ...... blablabla
The same happened to me with other libraries (e.g. processing.serial.*), but worked again after setting the default Java Engine back to 32bit in the Java Preferences App. AppleScript however, is still not working.
Am I the only one Is there a fix
i have tried the workaround discussed here in the forum, but I can neither find the "com" folder, nor create a .jar archive of anything by right clicking it. Something tells me I'm missing a crucial step here.
The link to the workaround: (sorry, can't post acive links yet)
processing.org/discourse/yabb2/num_1225564736.html#5
Thanks for any help!