N nelly22 macrumors 6502 Original poster Sep 29, 2009 366 5 Jun 16, 2020 #1 How i can log when MBP Mojave lid is opened and closed? I think simple AppleScript and EventScripts could do it but not sure how.
How i can log when MBP Mojave lid is opened and closed? I think simple AppleScript and EventScripts could do it but not sure how.
robbieduncan Moderator emeritus Jul 24, 2002 25,611 893 Harrogate Jun 17, 2020 #2 Maybe look at the SO question as a starting point: https://superuser.com/questions/635308/how-to-have-an-application-closed-on-lid-close-in-os-x However this assumes your Mac sleeps on lid close and does not handle lid close with external displays and input device (I don't think, maybe sleepwatcher does handle that) [automerge]1592383705[/automerge]
Maybe look at the SO question as a starting point: https://superuser.com/questions/635308/how-to-have-an-application-closed-on-lid-close-in-os-x However this assumes your Mac sleeps on lid close and does not handle lid close with external displays and input device (I don't think, maybe sleepwatcher does handle that) [automerge]1592383705[/automerge]
S Senor Cuete macrumors 6502 Nov 9, 2011 431 32 Jun 17, 2020 #3 Look at the developer documentation for NSEvent. It might be helpful.