WindowSaver icon indicating copy to clipboard operation
WindowSaver copied to clipboard

sounds like just what i need ...but: "error waiting for multitasking viewing frame"

Open pprotschka opened this issue 7 years ago • 18 comments

pprotschka avatar Dec 03 '16 18:12 pprotschka

Hmm, I haven't used this in a while, its possible a windows update has broken the script.

KroniK907 avatar Dec 28 '16 00:12 KroniK907

I can confirm. Sometimes the error message is a little different, something like error waiting for context menu

et2010 avatar Jan 29 '17 17:01 et2010

Can confirm, same error message - fix would be amazing, exactly what I was looking for

naefl avatar Jan 10 '18 22:01 naefl

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.

Cyber5imon avatar Jan 28 '18 06:01 Cyber5imon

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.

KroniK907 avatar Jan 29 '18 17:01 KroniK907

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...

Cyber5imon avatar Jan 29 '18 18:01 Cyber5imon

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.

KroniK907 avatar Jan 29 '18 20:01 KroniK907

+1 to this issue.

okgolove avatar Mar 09 '18 09:03 okgolove

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.

KroniK907 avatar Apr 03 '18 22:04 KroniK907

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!

Cyber5imon avatar Apr 03 '18 23:04 Cyber5imon

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).

KroniK907 avatar Apr 04 '18 00:04 KroniK907

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!

Cyber5imon avatar Apr 04 '18 15:04 Cyber5imon

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!

Cyber5imon avatar Apr 05 '18 22:04 Cyber5imon

Here is what I found about the specific settings: https://superuser.com/questions/1229963/windows-10-disable-reopening-programs-after-restart-startup/1296139#1296139

KroniK907 avatar Apr 06 '18 00:04 KroniK907

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!

Cyber5imon avatar Apr 06 '18 01:04 Cyber5imon

@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.

rballonline avatar Jun 06 '19 22:06 rballonline

Looks like there's this https://www.autohotkey.com/boards/viewtopic.php?f=6&t=17228 Looks more robust and still active.

rballonline avatar Jun 06 '19 23:06 rballonline

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.

robeving avatar May 24 '20 15:05 robeving