Post NSEvent不工作
谁能告诉我下面的代码有什么问题吗。我想模拟aPost NSEvent不工作,post,keyboard,keystroke,simulate,nsevent,Post,Keyboard,Keystroke,Simulate,Nsevent,谁能告诉我下面的代码有什么问题吗。我想模拟a NSEvent* keyEvent = [NSEvent keyEventWithType:NSKeyDown location:NSZeroPoint modifierFlags:NSCommandKeyMask timestamp:0 windowNumber:[windowNumber intValue] context:[NSGraphicsContext currentContext] characters:@"A" charactersI
NSEvent* keyEvent = [NSEvent keyEventWithType:NSKeyDown location:NSZeroPoint modifierFlags:NSCommandKeyMask timestamp:0 windowNumber:[windowNumber intValue] context:[NSGraphicsContext currentContext] characters:@"A" charactersIgnoringModifiers:nil isARepeat:NO keyCode:0];
[NSApp postEvent:keyEvent atStart:NO];