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

<< < (9/13) > >>

mouser:
Welcome, Andy.  :up:

Skrommel is the magical creature who deserves the real thanks here.  I am happy to be able to take his work and improve it.
I myself can't wait until I see how this performs tomorrow morning.

And it's nice to see that there is someone else who will benefit from this tool.

By the way -- how did you discover this thread so quickly?


I can already say that it works well enough in my testing that even if the current version isn't perfect, it soon will be -- which is a nice feeling.

Once the program is all cleaned and polished up, I hope we can spread the word to others who have been suffering with this problem.

mouser:
Skrommel -- If you are looking for features to add, another feature that would be nice to add to this tool is a menu item to put the monitors to sleep -- nircmd has a function for this but i think it's a naturally feature to add to this tool's tray menu if it's easy to add, and it would definitely help others test the tool.

AndyD:
A big thanks to Skrommel as well then!

I searched for "keep the state of multiple screens when power is switched off" and this website was near the bottom of the first page.

I am using this project to fix issues inside my office which works great now, just a bit of background info should you want to read it on what i have been doing.

We have many multiple monitors in my head office which are connected to single computers that display information, how profitable we are etc using Power BI and Excel Dashboards.

So first issue was no one was turning the screens off, which meant we walk around the offices to make sure they went off at night, i fixed this issue with smart plugs to switch off at 7pm and on at 7am monday to friday.

Next issue was when power was restored at 7am on multiple monitors the windows was all on the primary screen.

So my solution was use nircmd to sleep and wake at the times above, this didnt work still. so i done some digging for software that will keep the state of the screens.

Which is when i came across this page and did a test and it worked, but my issue was still happening.

The way i have resolved it is, at 6:58pm, a scheduled task run with nircmd to put the computer into sleep (without this power is cut and WinPosSaver wont know the state of the windows). At 7am power is restored to the monitors and then at 7:02am, i send another task to wake the screen, WinPosSaver then re-arranges all the windows back for me.

I have some testing to do over the next week but if this works i will be rolling this out to all multiple monitors.

All this because people are lazy to switch a tv screen off!

mouser:
The way i have resolved it is, at 6:58pm, a scheduled task run with nircmd to put the computer into sleep (without this power is cut and WinPosSaver wont know the state of the windows)
--- End quote ---

Just a note that WinPosSaver doesn't need for the COMPUTER to go to sleep/hibernate (though that may work too), it just needs the MONITOR to go to sleep, which is a separate thing.

Note also that skrommel's code (and my tweaks to it), could very easily be modified to work as commandline function for saving windows and restoring them on command, regardless of monitor status.  So that would be an easy functionality to add if it would be useful.

AndyD:
Apologies, i did not mean computer to sleep, put the monitor to sleep (in my case i am putting TV screens to sleep).

If the code could be tweaked so that when the script is run (if possible via a Scheduled Task), it could save the state of the windows that would save me messing around with extra batch files to get the screen to sleep so WinPosSaver will save the state.

Then all i would need to do is pull the screen power, and when the screens power restores the script auto runs and re-arranges the windows, or i run the script via Scheduled Task a few minutes after the power is restored to the screens to re-arrange windows.

Is this possible?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version