Permalink
Switch branches/tags
Nothing to show
Find file
Fetching contributors…
Cannot retrieve contributors at this time
27 lines (17 sloc) 729 Bytes
// Note, this requires the Acorn JSEnabler plugin to be installed.
// http://code.google.com/p/flycode/source/browse/trunk/jstalk/extras/acornplugin/
// application: gets an object from Acorn over DO
var acorn = JSTalk.application_("Acorn");
var outPath = "/tmp/jimi.png";
var firstDoc = acorn.orderedDocuments().objectAtIndex_(0);
for (i = 0; i < 10; i++) {
firstDoc.windowController().callFilterWithName_("CIGaussianBlur");
NSThread.sleepForTimeInterval_(0.2);
}
firstDoc.dataRepresentationOfType_("public.png").writeToFile_(outPath);
firstDoc.undoManager().undo();
var qt = SBApplication.application_("QuickTime Player");
print(qt);
qt.open_(NSURL.fileURLWithPath_(outPath));
qt.activate();
print("Hurray!");