Created
December 16, 2010 21:01
-
-
Save atr000/744007 to your computer and use it in GitHub Desktop.
cleanupd desktop files
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#import <Foundation/Foundation.h> | |
int main(int argc, const char* argv[]) | |
{ | |
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init]; | |
NSAppleScript* script = [[NSAppleScript alloc] initWithSource:@"tell application \"Finder\"\nclean up window of desktop\nend tell"]; | |
while ( true ) | |
{ | |
NSAutoreleasePool* pool2 = [[NSAutoreleasePool alloc] init]; | |
[script executeAndReturnError:nil]; | |
sleep(30); | |
[pool2 release]; | |
} | |
[pool drain]; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment