hi, I am writing application A and application B using Object-C++ and Object-C. A include restart OS code by using apple script to tell finder to restart os.
the code is following : NSDictionary *error = nil; NSAppleScript *script = [[[NSAppleScript alloc] initWithSource:@"tell application \"Finder\"\nrestart\nend tell"] autorelease]; [script executeAndReturnError:&error]; I want that App B call App A to restart OS. But it is failed([script executeAndReturnError:&error] == nil ). ( I found It is OK that calling restart OS code from App A directly) I got the error number and message. NSAppleScriptErrorNumber = -2709 the error message is "Can't get the event dictionary" . It sounds like the apple event dictionary can not be found or something else. But I don't know what it means concretely and how to fix the problem. I have this question for several days. I can't find any information about this. Anyone can help me? _______________________________________________ Cocoa-dev mailing list ([email protected]) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]
