Comments (8)
@huo-feng-ding updated
from vd.ahk.
代码里有个 Send "q" 这个是否可以去掉,在有个应用下边切换的时候因为这个没切过去
from vd.ahk.
我试了 去了 send “q”, 但是在TIM.exe,xyplorer.exe等一些应用下边还是切换不了桌面
from vd.ahk.
change Sleep 10
to Sleep 100
, does it fix it ?
Send "q"
can be replaced by any letter, it is needed to set keyboard focus to hWnd
from vd.ahk.
actually, change the whole function so there are 2 Sleep:
static _WinActivate_CreateRemoteThread(hWnd) {
foregroundWindow := DllCall("GetForegroundWindow", "Ptr")
threadID := DllCall("GetWindowThreadProcessId", "Ptr", foregroundWindow, "Uint*", &PID := 0)
currentThreadID := DllCall("GetCurrentThreadId")
if (threadID != currentThreadID) {
hThread := DllCall("OpenThread", "Uint", 0x0002, "Int", 0, "Uint", threadID)
DllCall("SuspendThread", "Ptr", hThread)
hProcess := DllCall("OpenProcess", "Uint", 0x0002, "Int", 0, "Uint", PID, "Ptr")
user32 := DllCall("GetModuleHandleA", "AStr", "user32", "Ptr")
SetForegroundWindow := DllCall("GetProcAddress", "Ptr", user32, "AStr", "SetForegroundWindow", "Ptr")
DllCall("CreateRemoteThread", "Ptr", hProcess, "Ptr", 0, "Ptr", 0, "Ptr", SetForegroundWindow, "Ptr", hWnd, "Uint", 0, "Ptr", 0)
Sleep 100
Send "q"
Sleep 100
DllCall("ResumeThread", "Ptr", hThread)
DllCall("CloseHandle", "Ptr", hThread)
DllCall("CloseHandle", "Ptr", hProcess)
}
}
from vd.ahk.
换上了边的代码也不行,TIM.exe在窗口激活的情况下,去切换不起作用,切不过去
from vd.ahk.
我用xyplorer.exe切换不了, 可以不用下载TIM.exe了, 谢谢bug report
XYplorer Trial Version
ThunderRT6FormDC
XYplorer.exe
0x16C00080
0x00000109
XYplorer
ThunderRT6FormDC
XYplorer.exe
0x06CF0000
0x00040100
XYplorer
ThunderRT6Main
XYplorer.exe
0x94090000
0x00000080
___
This PC - XYplorer ### 30-Day Trial Version - Day 1 ### - 24.40.0100
ThunderRT6FormDC
XYplorer.exe
0x16CF0000
0x00040100
XYplorer
ThunderRT6Main
XYplorer.exe
0x94090000
0x00000080
from vd.ahk.
借助SetForeGroundWindow.exe切换桌面没有问题了,谢谢
from vd.ahk.
Related Issues (20)
- 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
- "Error: (0x80004002) No such interface supported" after updating Windows 11 (Beta insider channel) HOT 13
- 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
- Not working on 24H2 (26100.712) HOT 2
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.