-
Notifications
You must be signed in to change notification settings - Fork 50
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
can not change desktop #39
Comments
My system: |
just to make sure: "shared on all desktops means" is a synonym for "Show this window on all desktops" or VD.PinWindow()
no I tried on a clean install of Win10 with the same |
thank you for your answer. Maybe I have than something else running which causes this strange behaviour in combination with your script. I have tried it on my working PC. I will go back to work on monday and will try to find out what goes on! |
to confirm: "shared on all desktops means" is a synonym for "Show this window on all desktops" or VD.PinWindow() what i do: same behaviour with edtior window Info: on startup of script only one desktop opened (the script produces the other ones) if i start the CurrentVirtualDesktopChanged RegisterDesktopNotifications.ahk in other examples i get also normal results with pinned windows but stragen one if i do not pinn (example for moving from desktop 1 to 3): |
…w must be "shared on all desktops" #39
@mmaukii try the update ? |
Thanks for your efforts. I downloaded the new version. Unfortunatly did not work. I also found the strange behaviour |
I'm out of ideas, try running as admin ? also try out this branch https://github.com/FuPeiJiang/VD.ahk/tree/debug39 the ToolTips are explained here: #40 (comment) |
I'm not able to switch VD when Microsoft Teams is active I feel a fix is incoming to this issue |
i also had at that time MSTeams active. My Browser is firefox, so it could be connected to MSteams. |
@mmaukii download the newest version again ? and run as admin ? |
sorry i did not work out. But i found something strange. If i add a msgbox at the end of goToDesktopNum(desktopNum) {
And i run this without the focus on the ahk example window i can switch to the desktops. It seems to me, that the desktopswitching is woking (fast jump to the right desktop) but then something automatically moves the focus back to the starting desktop. That does not apply with this "experiment" |
No idea what this "if" is doing. I think it get not even called by the code but if I comment it out everything seems to work in the first place: ... |
@mmaukii if (this._activateWindowUnder(VD_animation_gui_hwnd)==-1) {
this._activateDesktopBackground()
} inside goToDesktopNum ? but before I do that, can you tell me if the code reaches the line if (this._activateWindowUnder(VD_animation_gui_hwnd)==-1) {
msgbox 1234567
this._activateDesktopBackground()
} ___ if (!(OutputVar_MinMax==-1)) { ;not Minimized
; WinActivate % "ahk_id " theHwnd
WinGetTitle winTitle, % "ahk_id " theHwnd
WinGetClass className, % "ahk_id " theHwnd
WinGet processName, ProcessName, % "ahk_id " theHwnd
WinGet winStyle, Style, % "ahk_id " theHwnd
WinGet winExStyle, ExStyle, % "ahk_id " theHwnd
clipText:=winTitle "`n" className "`n" processName "`n" winStyle "`n" winExStyle
Clipboard:=clipText
ToolTip % clipText
Sleep 500
ToolTip
DllCall("SetForegroundWindow","Ptr",theHwnd)
returnValue:=theHwnd
break
} |
msgbox 1234567 is not reached when i put it in the code. not with pinned window and also not without it. |
_activateWindowUnder(excludeHwnd:=-1) {
bak_DetectHiddenWindows:=A_DetectHiddenWindows
DetectHiddenWindows, off
returnValue:=-1
WinGet, outHwndList, List
loop % outHwndList {
theHwnd:=outHwndList%A_Index%
if (theHwnd == excludeHwnd) {
continue
}
if (pView:=this._isValidWindow(theHwnd)) {
WinGet, OutputVar_MinMax, MinMax, % "ahk_id " theHwnd
if (!(OutputVar_MinMax==-1)) { ;not Minimized
; WinActivate % "ahk_id " theHwnd
WinGetTitle winTitle, % "ahk_id " theHwnd
WinGetClass className, % "ahk_id " theHwnd
WinGet processName, ProcessName, % "ahk_id " theHwnd
WinGet winStyle, Style, % "ahk_id " theHwnd
WinGet winExStyle, ExStyle, % "ahk_id " theHwnd
clipText:=winTitle "`n" className "`n" processName "`n" winStyle "`n" winExStyle
Clipboard:=clipText
ToolTip % clipText
Sleep 500
ToolTip
DllCall("SetForegroundWindow","Ptr",theHwnd)
returnValue:=theHwnd
break
}
}
}
DetectHiddenWindows % bak_DetectHiddenWindows
return returnValue
} |
with firefox open i get the following tooltip |
so firefox was the active window before switching ? or it is the active window in the desktop you're trying to switch to ? one fix is to filter the windows inside what's your AHK version ? MsgBox % Clipboard:=A_AhkVersion |
it seems to work!!!!! thank you a lot. Now i can work happily. Thank again for your effort and the great tool!! |
thank you first for your great tool!
I only have one issue and i do not know if i am doing wrong or if it should work that way.
I open the example file. I then select a window, which is not shared on all desktops. The script produces a short blink in the screen an i stay on the orignal desktop. I only can change between the desktops if the active Windwo is shared between all desktops. Is this intended to be like that?
I would be happy if I could switch direktly to any desktop regardless which windwo is active.
greets Daniel
The text was updated successfully, but these errors were encountered: