Comments (13)
Yeah, I figured I could live with a few bugs in the beta program but didn't expect it would break something so crucial to my workflow!
from vd.ahk.
Broken here too. Since this update will be live for standard users of Windows 11 soon, I'd love to have it fixed.
I'm using:
https://github.com/FuPeiJiang/VD.ahk/blob/class_VD/_VD.ahk
from vd.ahk.
Updating another machine revealed that I was guessing the version numbers wrong. So I gave in and forked it. https://github.com/Viqsi/VD.ah2
from vd.ahk.
Thanks @Viqsi! :) I've applied the update to _VD.ahk, basically the same diff but without the new splitByDot
calculation and revNumber
and it works: https://gist.github.com/JanChec/a555a42c949ff5f6b78e92362143a9d2
from vd.ahk.
I'm afraid I'm seeing the same issue: the latest update broke it 🤦
Regretting being on the Beta program so much right now 🤣
from vd.ahk.
I imagine this explains why the window moving feature doesn't work anymore.
from vd.ahk.
Looks like VirtualDesktop.cs has been updated, and VirtualDesktop11-23H2.cs should work, see VirtualDesktop/issues/67. I'm not sure how to do this, though, can you point me in the right direction and I can try to do a PR to test this
from vd.ahk.
This is as far as I got. Providing as a diff rather than a pull request because I'm not really prepared to go further (and I never actually forked the repo):
diff --git a/VD.ah2 b/VD.ah2
index d90394e..6a78111 100644
--- a/VD.ah2
+++ b/VD.ah2
@@ -19,7 +19,7 @@ class VD {
this._dll_CreateDesktop := this._dll_CreateDesktop_Win10
this._dll_GetName := this._dll_GetName_Win10
this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win10
- } else {
+ } else if (buildNumber < 22620) {
IID_IVirtualDesktopManagerInternal_ := "{B2F925B9-5A0F-4D2E-9F4D-2B1507593C10}"
IID_IVirtualDesktop_ := "{536D3495-B208-4CC9-AE26-DE8111275BF8}"
this._dll_GetCurrentDesktop := this._dll_GetCurrentDesktop_Win11
@@ -27,6 +27,14 @@ class VD {
this._dll_CreateDesktop := this._dll_CreateDesktop_Win11
this._dll_GetName := this._dll_GetName_Win11
this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win11
+ } else {
+ IID_IVirtualDesktopManagerInternal_ := "{A3175F2D-239C-4BD2-8AA0-EEBA8B0B138E}"
+ IID_IVirtualDesktop_ := "{3F07F4BE-B107-441A-AF0F-39D82529072C}"
+ this._dll_GetCurrentDesktop := this._dll_GetCurrentDesktop_Win10
+ this._dll_GetDesktops := this._dll_GetDesktops_Win10
+ this._dll_CreateDesktop := this._dll_CreateDesktop_Win10
+ this._dll_GetName := this._dll_GetName_Win11
+ this.RegisterDesktopNotifications := this.RegisterDesktopNotifications_Win11
}
this.IVirtualDesktopManager := ComObject("{AA509086-5CA9-4C25-8F95-589D3C07B48A}", "{A5CD92FF-29BE-454C-8D04-D82879FB3F1B}")
this.GetWindowDesktopId := this._vtable(this.IVirtualDesktopManager.Ptr, 4)
@@ -41,7 +49,7 @@ class VD {
this.Ptr_CreateDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 10)
this.Ptr_RemoveDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 11)
this.FindDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 12)
- } else if (buildNumber < 22489) {
+ } else if (buildNumber < 22489 or buildNumber >= 22621) {
this.GetDesktops := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 7)
this.Ptr_CreateDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 10)
this.Ptr_RemoveDesktop := this._vtable(this.IVirtualDesktopManagerInternal.Ptr, 12)
My usage of VD.ahk is limited to exactly four methods: getNameFromDesktopNum, goToDesktopNum, MoveWindowToDesktopNum, and getCurrentDesktopNum. This works for those methods. I have absolutely no idea if any of the others work or not with this change and have no reasonable means of testing. But maybe it'll help.
Basically I started with "it looks like they changed a lot of the function params back to the way they had them in Win10" (based on staring very very hard at that VirtualDesktop.cs project code) and started trial-and-error switching to those instead.
from vd.ahk.
Seems to be working for me (Win11 10.0.22631), super appreciate the efforts!
from vd.ahk.
Seems to be working for me (Win11 10.0.22631), super appreciate the efforts!
It's not just the build number, it's the build revision as well; that's what makes this so annoying. 10.0.22631.2134 and earlier revisions are fine with the Old Ways, but 10.0.22631.2283 is not. I suspect the change happened with the preview release 10.0.22631.2215 (and that's what I checked for in the fork), but don't have actual confirmation of that as I don't do preview releases.
from vd.ahk.
Hmm, I did just see an update (in the Release Preview channel), so hopefully that doesn't complicate things. At any rate, I am on 10.22631.2361 now, and I believe VD stopped working for me on 10.0.22631.2050.
from vd.ahk.
Just a heads up to the others in this thread that the GUID for the COM has also changed with this months release. Fix in this PR #62
from vd.ahk.
So far as I can tell this was resolved with 02f37bf. (The referenced commit above presumably fixed it for the AHKv1 version; this one fixes it for the v2 version). At least, I tested it and it Works For Me on build 22631.3155, so I've closed the PR from my fork and will be doing a pull shortly (read: as soon as I get around to it, if I get around to it ;) ).
from vd.ahk.
Related Issues (20)
- After pinning with AH2 version, I get an error when switching desktops by number.
- Script sending "Q" to discord | Desktop switch failure. HOT 2
- getDesktopNumOfWindow sometimes returns -1 rather than the correct num HOT 4
- Error HOT 10
- open Application directly on one virtual desktop in background HOT 2
- sending keypress to specified virtual desktop only.
- Ah2: Desktop Looping & Switching + Other Feature Regression from Commit ee2f54f626914273f00853306c1daaf803f756cb HOT 2
- It doesn't work on Windows 11 Build 22621.2215 (22H2) HOT 2
- A problem with the new Windows update 11 HOT 18
- Virtual desktop Tasksbar icons HOT 4
- renaming desktops HOT 1
- Switching to Relative Desktop fails initially HOT 2
- Current desktop count is always zero
- New Windows Build 23606: VD.getCurrentDesktopNum() always returns 0 HOT 4
- Windows Server 2022 version HOT 3
- It doesn't work on Windows 11 Build 22631.3085 (23H2) HOT 13
- v2_port分支没有 TogglePinApp,PinApp,UnPinApp HOT 2
- WinExist in another virtual desktop HOT 7
- Previous Desktop HOT 9
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vd.ahk.