toxicsoftware.com

RANDOMIZE USR 0

toxicsoftware.com header image 4

Run Python Script

December 14th, 2007 · Comments · Default

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:·····

Grab that Invocation

June 23rd, 2006 · Comments · Default

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:··

mdfind2 updated

June 3rd, 2006 · Comments Off · Default

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:···