ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

Desperate app request - restore window positions after wake from sleep scrambles

<< < (2/13) > >>

app103:
What causes the monitors to wake? User activity?

How long do they take to wake after keyboard/mouse activity?

Set the time to wakeup time + 5 seconds before running the restore.

That way, if you move the mouse or tap any key on the keyboard, it will then wait long enough for your monitors to wake, before running the restore.

skrommel:
 :) WinPosSaver saves the window positions every minute, and restores the layout after sleep or hibernation.

Desperate app request - restore window positions after wake from sleep scrambles

You can quickly test it by using Save layout and Load layout from the menu.

This is the first draft, so please report errors. I have plenty of ideas for it, like saving and loading multiple layouts, option to automatically restart the programs when loading layouts, detecting when monitors are added and removed...

26.07.2017: Added monitor sleep detection. Also logs power changes to Log.txt

Skrommel

mouser:
Ok well first of all, I am thrilled, thrilled, thrilled to see the amazing skrommel working on this idea.. I suffer from this problem to this day, and it drives me crazy.  I would love to have a solution.
I do imagine it will take some iteration and quite a bit of experimentation to get it working flawlessly, but Im happy to test.  Downloading now.

Just a heads up, before I even use it I will report one thing -- DC Members skwire (the *other* ahk master on this forum) worked with me a bit on trying to identify the nature of the problem, and one unpleasant thing we discovered is that the windows displaychange messages that are broadcast whenever resolution/monitor changes happen, would occasionally FAIL TO REPORT a change, at least on my machine.  This means that any solution to this problem cannot rely on those messages being 100% accurate.

mouser:
ps. I would love the ahk code so I can help tweak and experiment!

skrommel:
Uploaded the sourcecode. So your displays disconnect when they go to sleep, and not when the PC sleeps? That could possibly be detected in the program by watching the mouse and keyboard inactivity?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version