Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switching to Relative Desktop fails initially #59

Open
daveM246 opened this issue Oct 5, 2023 · 2 comments
Open

Switching to Relative Desktop fails initially #59

daveM246 opened this issue Oct 5, 2023 · 2 comments

Comments

@daveM246
Copy link

daveM246 commented Oct 5, 2023

I'm running the v2_port version with a modified VD.ah2 so that it works under windows 11 build 22621.
The VD.ah2 is attached
When I run the MoveToDesktop.ahk (attached) the ^#left and ^#right do not switch to the relative desktop. The code runs but the desktop doesn't change.
If I run #!right everything comes right: I can then use ^#left and ^#right as expected, until the next time that I load the AHK script (next logon).
If I uncomment the MsgBox line (line 41 in MoveToDesktop.ahk) then everything works (after acknowledging the MsgBox). Similarly if I put a MsgBox in the ^#left and ^#right section they will also work but that puts up a MsgBox every time the key combo is used !

Files.zip

@daveM246
Copy link
Author

daveM246 commented Oct 6, 2023

Actually, after a computer restart with the compiled exe loading from startup, the MsgBox doesn't help. I need to do a #!right (or left) before the ^#left or ^#right will move to the relative desktop.
I'm getting the exact same issue on a windows10 computer with the same MoveToDesktop compiled using V2.0.2 AutoHotKey64.exe
attached is all of the files used.
AHKMoveToDesktop.zip

@daveM246
Copy link
Author

daveM246 commented Oct 6, 2023

I did some more testing. Cloned the v2_port branch again, added in my extras (Icon folder and MoveToDesktop.ahk) and replaced VD.ah2 with the modified version to work on latest windows 11. Ran the ahk and it worked perfectly. Made an exe and it worked perfectly, even after Exit and reloading. Rebooted the computer and back to same issue of the goToRelativeDesktopNum not working until after a #!left (or right) was used. Seems something is changing from one windows session to another and is not being initialized initially .
Found that it I use ^#, and ^#. instead of ^#left and ^#right it works correctly even after making an exe and rebooting. This is also weird as I had tested by putting a MsgBox in the code for those key combos and the MsgBox would show up but the desktop would not change which meant that the key combo was being actioned by AHK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant