[Pythonmac-SIG] [py-appscript] is System Events sleeping ?

Fandekasp fandekasp at gmail.com
Sun Jan 30 16:12:39 CET 2011


Ok so the only solution for me is to map a sleep key which will call my
program and plan some tasks (threading.Timer), and my program will force my
system to sleep after that.

Thank you Adam for your answer !

On 30 January 2011 14:49, Adam Morris <amorris at mistermorris.com> wrote:

> Hi there,
>
> > I can force my system to sleep, but what I would like is to know when my
> > system is going to sleep, to launch some routines behind (like
> programming
> > an alarm to ring after 6 hours).
>
> I'm pretty sure not.
>
> Applescript doesn't let you register callbacks within the system, and
> even if you did something with a poll (endless repeat loop), the
> repeat loop itself would prevent it from sleeping in the first place.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pythonmac-sig/attachments/20110130/eecb3233/attachment.html>


More information about the Pythonmac-SIG mailing list