WindowSaver
WindowSaver copied to clipboard
sounds like just what i need ...but: "error waiting for multitasking viewing frame"
Hmm, I haven't used this in a while, its possible a windows update has broken the script.
I can confirm. Sometimes the error message is a little different, something like error waiting for context menu
Can confirm, same error message - fix would be amazing, exactly what I was looking for
I also receive the same error. Clicking ok progresses the script, but the error returns on each screen it is trying to save... Please consider a fix as this is the ONLY program that saves/restores positions with virtual desktops.
Ok, so the problem here is that the script was designed to figure out what desktop it is on by using the Win+Tab multi tasking screen. It would perform a right click action which used to display a right click menu which contained what desktop you were currently looking at.
Unfortunately, this is no longer the case and there is no right click menu anymore. So I am going to have to come up with some new way to figure out which desktop it is on.
I think I have an idea where I can use the CTRL+Win+RightArrow or LeftArrow to scroll through the desktops, however its going to be difficult to know how many desktops to scroll through. I might just have to force users to input the number of virtual desktops they are using as a part of the function call, I'm not sure.
In any case, this is a problem because windows changed its functionality. I'll try to get to this soon, but I'm rather busy.
This will show you how to do it using the registry: https://github.com/jpginc/windows10DesktopManager Let me know if you need help integrating it into your code...
Well shoot, that is an awesome tool. I almost just want to pull my window saver code into that. But I'll look into how it works and try that method out first.
+1 to this issue.
Sorry guys, I'm just too busy right now to really deal with this. Not to mention windows 10 now saves program window locations and more and restores them on a restart. This is a standard feature since the creators update.
If someone wants to look into this and make a pull request, I'm happy to pull in a fix, but for me, since windows does what I was trying to do with this script, I have no real interest in keeping this alive.
Can you help shine some light on how I can save my virtual desktop windows and positions in Windows 10 Creators Update? Thanks in advance!
If you have the creators update installed, you should literally be able to have all your windows open and on different virtual desktops and hit the restart button, and when the computer restarts, all of your windows should pop up exactly where you left them. No extra settings required. In fact, AFAIK there is no way to disable this feature at the moment if you dont like it.
This also works if you click the shutdown button in the start menu.
Your windows will NOT be saved if: Your computer is unplugged or if your laptop has the battery removed while its running. You run the shutdown command from the command prompt You hold down the power button on your machine to shut it down You hit the hard reset button on your computer to restart the machine You close all your windows before you restart or shutdown (duh).
WOW! I'm so used to closing all my windows to prevent any data loss from unsaved documents or the screen that says waiting for the following applications. I never considered leaving any windows open.
Thanks for the info!
KroniK907 I just restarted with about 25 windows/apps open. Only 2 apps reopened upon login, Outlook and Word, and both opened in the first virtual desktop, not where they were locate before the reboot. Are you sure this functionality is integrated into the Creators Update? Can you point me to any reference material on this? I completely understand you not having enough time to work on this repository. However, if I can't get this functionality in Windows, then I'll fork this repository and work on it myself. Any input you can provide is greatly appreciated. I'm just trying to take the path of least resistance. I desperately need this as I have 10 virtual desktops with 20 to 35 windows/apps open. Rebooting is a chore to say the least!
Here is what I found about the specific settings: https://superuser.com/questions/1229963/windows-10-disable-reopening-programs-after-restart-startup/1296139#1296139
Thank you for the link. Unfortunately, as mentioned in the comments, the "feature" only works for some applications. It definitely doesn't work for all (or even most, in my case)...
I'm going to work on a fork to try and get this WindowSaver repo working well. Thank you for all your work so far!
@SPDurkee how's the fork coming? I was going to use this for different window configurations. Dev/Testing/Casual etc. New to ahk but with some pointers maybe we can get this working again.
Looks like there's this https://www.autohotkey.com/boards/viewtopic.php?f=6&t=17228 Looks more robust and still active.
I replaced with getCurrentDesktopNumber() with
getCurrentDesktopNumber(leaveWinTabOpen := true) {
hVirtualDesktopAccessor := DllCall("LoadLibrary", "Str", A_ScriptDir . "\VirtualDesktopAccessor.dll", "Ptr")
GetWindowDesktopNumberProc := DllCall("GetProcAddress", Ptr, hVirtualDesktopAccessor, AStr, "GetWindowDesktopNumber", "Ptr")
WinGet, activeHwnd, ID, A
current := DllCall(GetWindowDesktopNumberProc, UInt, activeHwnd)
return current
}
You'll also need the VirtualDesktopAccessor.dll from https://github.com/Ciantic/VirtualDesktopAccessor in the CWD.