X-Git-Url: http://git.ithinksw.org/ITFoundation.git/blobdiff_plain/1ea39b0f18a93a1622b987e11b502b3b4ac2f821..c9052c980424ad549525715bd3b1239d6dd4ca11:/ITAppleEventCenter.m diff --git a/ITAppleEventCenter.m b/ITAppleEventCenter.m index 562dbc7..2466e43 100755 --- a/ITAppleEventCenter.m +++ b/ITAppleEventCenter.m @@ -613,171 +613,4 @@ return result; return result; } -- (long)sendAEWithSendStringForNumber:(NSString*)string eventClass:(NSString*)eventClass eventID:(NSString*)eventID appPSN:(ProcessSerialNumber)psn fixForAECrappiness:(long)fix -{ - //Add error checking... - AEEventClass eClass = *((unsigned long*)[eventClass UTF8String]); - AEEventID eID = *((unsigned long*)[eventID UTF8String]); - - const char *sendString = [string UTF8String]; - SInt32 result = 0; - - AppleEvent sendEvent, replyEvent; - - DescType resultType; - Size resultSize, charResultSize; - - AEBuildError buildError; - OSStatus err; - OSErr err2, err3; - /* - if ((GetProcessPID(&psn, &pid) == noErr) && (pid == 0)) { - NSLog(@"Error getting PID of application! Exiting."); - return nil; - } - */ - //NSLog(@"_sendString: %s", sendString); - - err = AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, 0, &sendEvent, &buildError, sendString); -[self printCarbonDesc:&sendEvent]; - //now AEBuildAppleEvent has inserted a bogus integer in there for no reason, so we fix it ourselves. - { //this sucks -//hey, i'm coding this in pico, sccrew indention -char *buf; -Size s,i; -s = AESizeOfFlattenedDesc(&sendEvent); -buf = malloc(s); -AEFlattenDesc(&sendEvent,buf,s,NULL); -AEDisposeDesc(&sendEvent); -for (i=0;i