andmcadams / iMessageForwarder

6 stars 1 forks source link

Macbook sleep mode breaks program #50

Closed andmcadams closed 4 years ago

andmcadams commented 4 years ago

If the Macbook goes to sleep, messages will not be sent. This seems to be because the program can not access what is on the screen while the screen saver is up. Simple fix would be a) making it so your Mac can't enter this mode or b) move the mouse or perform some action to wake up a sleeping device. Option b) is probably the more desirable solution in order to minimize power consumption while inactive.

andmcadams commented 4 years ago

Sleep mode does not seem to be able to be overcome except by utilizing WoL (wake on LAN).

I'm not sure how accessible this is on different Mac devices and OSes, so for now I'm focusing on patching this in the case of the screen saver being on. This is as simple as making a "dead click" through autopygui that does clicks somewhere were nothing will happen. Simply moving the cursor with autopygui does not seem to bring the display back up.