[英]Autohotkey Windows 10 Virtual Desktops
I have an AHK script which saves window positions.我有一个 AHK 脚本可以保存 window 位置。 At the moment I save Title, X, Y, Width, Height, Class, FullPath etc. I also want to save on which Virtual Desktop they are located on.
目前我保存标题、X、Y、宽度、高度、Class、FullPath 等。我还想保存它们所在的虚拟桌面。
I dont know how Windows 10 handles Virtual Desktops: Do they have a UID?我不知道 Windows 10 如何处理虚拟桌面:他们有 UID 吗? Do these UIDs change after a reboot?
重启后这些 UID 会改变吗? Is there any way to actually number them?
有什么方法可以实际编号它们吗?
I would like to do it in a way which has a low chance of breaking in case of a Windows update, but obviously that's mostly a dream.我想以一种在 Windows 更新的情况下破坏的可能性很小的方式来做,但显然这主要是一个梦想。
Thanks for any help!谢谢你的帮助!
I've made an ahk function library,我制作了一个 ahk function 库,
to get the desktop (number) a window is on, use VD_getDesktopOfWindow(wintitle)
, where wintitle
can be combination of WinTitle
, ahk_class
, ahk_exe
, ahk_id
, etc.要获取打开 window 的桌面(编号),请使用
VD_getDesktopOfWindow(wintitle)
,其中wintitle
可以是WinTitle
、 ahk_class
、 ahk_exe
、 ahk_id
等的组合。
https://github.com/FuPeiJiang/VD.ahk https://github.com/FuPeiJiang/VD.ahk
I've just made a script "list VD of all windows.ahk" in folder "other examples" to do what you need我刚刚在文件夹“其他示例”中创建了一个脚本“列出所有 windows.ahk 的 VD”来执行您需要的操作
It gets every window in every VD, and tells you, in order of VD, which windows are inside it.它获取每个 VD 中的每个 window,并按照 VD 的顺序告诉您,其中 windows 在其中。
Desktop 1: program.exe
Desktop 1: otherProgram.exe
Desktop 2: foobar.exe
Desktop 3: youGetThePoint.exe
the actual format is different实际格式不同
https://github.com/FuPeiJiang/VD.ahk/blob/master/other%20examples/list%20VD%20of%20all%20windows.ahk https://github.com/FuPeiJiang/VD.ahk/blob/master/other%20examples/list%20VD%20of%20all%20windows.ahk
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.