Example to send a Sleep AppleEvent from Cocoa ?
Example to send a Sleep AppleEvent from Cocoa ?
- Subject: Example to send a Sleep AppleEvent from Cocoa ?
- From: Steve Moon <email@hidden>
- Date: Tue, 20 Nov 2001 08:00:28 -0800
Hi
where can I find an example to send a Sleep AppleEvent to the system ?
Right now I am using a combinaison of call of :
1. AECreateDesc(typeApplSignature, &theFinderType, sizeof(OSType),
&theFinderAddress) with theFinderType = 'MACS'
2. AECreateAppleEvent(kAEFinderEvents, kAESleep, &theFinderAddress,
kAutoGenerateReturnID, kAnyTransactionID, &theActionEvent)
3. AESendMessage(&theActionEvent, NULL, kAENoReply | kAECanSwitchLayer |
kAEAlwaysInteract, kAEDefaultTimeout)
but without success...
Thank you!
Steve!