//AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, kAnyTransactionID, &event, nil, "");
if ((GetProcessPID(&psn, &pid) == noErr) && (pid == 0)) {
//NSLog(@"Error getting PID of application! Exiting.");
return nil;
}
//AEBuildAppleEvent(eClass, eID, typeProcessSerialNumber,(ProcessSerialNumber*)&psn, sizeof(ProcessSerialNumber), kAutoGenerateReturnID, kAnyTransactionID, &event, nil, "");
if ((GetProcessPID(&psn, &pid) == noErr) && (pid == 0)) {
//NSLog(@"Error getting PID of application! Exiting.");
return nil;
}