I’ve written an Automator action that allows you to write python scripts directly inside your Automator workflow.
“Run Python Script” Automator action (catchy title) is written using Python and PyObjC (now built-in to Mac OS X 10.5). Apple already provides “Run AppleScript” and “Run Shell Script” actions with Automator which give Automator a high degree of [...]
[Read more →]
Tags:Automator·Open Source·public·Python·Software·Source
CInvocationGrabber is a Cocoa class to help with creating NSInvocation objects.
NSInvocation objects are Cocoa’s equivalent of “functors” and are extremely handy. But unfortunately creating them is often a pain. For example, take the following code showing how to create a simple NSInvocation:
NSInvocation *theInvocation = [NSInvocation invocationWithMethodSignature:[theString methodSignatureForSelector:@selector(insertString:atIndex:)]];
[theInvocation setSelector:@selector(insertString:atIndex:)];
[theInvocation setTarget:theString];
NSString *theFirstArgument = "Hello World";
[theInvocation setArgument:&theFirstArgument atIndex:2];
unsigned [...]
[Read more →]
Tags:Cocoa·NSInvocation·Source
I’ve just updated mdfind2. The most important change is that it is now a universal binary. I’ve also improved the command-line parsing (it now uses getopt_long) and prints usage information on error.
Links:
Subversion Repository: http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Spotlight/mdfind2/
Binary: http://toxic-public.googlecode.com/svn/tags/BlogTag_20070927_729/Spotlight/mdfind2/Output/mdfind2.tar.bz2
[Read more →]
Tags:mdfind·Software·Source·Spotlight