Skip to content

Instantly share code, notes, and snippets.

@unixpickle
Created November 3, 2010 21:57
Show Gist options
  • Save unixpickle/661800 to your computer and use it in GitHub Desktop.
Save unixpickle/661800 to your computer and use it in GitHub Desktop.
a simple objective-c application to allow little snitch connections
#import <Foundation/Foundation.h>
int main (int argc, char * argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
NSAppleScript * scrpt = [[NSAppleScript alloc] initWithSource:@"set volume 0\n\
tell application \"System Events\" to set app_name to name of the first process whose frontmost is true\n\
tell application \"Little Snitch UIAgent\" to activate\n\
tell application \"System Events\" to keystroke return\n\
tell application app_name to activate\n\
delay 0.5\n\
set volume 7"];
[scrpt executeAndReturnError:nil];
[scrpt release];
[pool drain];
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment