I currently have a program that runs enigo.mouse_click(MouseButton::Left) (where enigo is a variable of Enigo::new()) many times in a short period, but it lags all other inputs behind when it does so. It appears to be an issue with Enigo, as the exact same code ported to Python, using pyautogui instead of Enigo, doesn't do this.
Does anyone know of a more optimized framework that can run mouse clicks and/or key presses for Rust? Is there a more optimized Enigo function? I'm currently running on Windows 10 for this project if that helps at all.
Edit: no one replied so I hope this will bump it and someone comes across it that knows a solution.
Related
I'm looking for a Windows program/solution to broadcast actions (mouse movement & clicks, keyboard would be a plus) in real time to multiple browser windows. Best way to describe the functionality I'm after is something like Bluestacks with its sync feature, but in my case with regular desktop browsers instead of emulated android devices. The goal would be to have 20-50 "slave" browsers that receive inputs from a single "master" browser.
I have tried for a long time to find a program that does this, but so far I've not been able to find one. If such thing doesn't exist, I would also be interested to know if this sort of program would be possible/complicated/expensive to code from scratch, as I have no coding experience myself (except basic level python course at the uni). If it's not too complicated and expensive, I might be looking to hire someone to do it.
Edit: I'm not looking for recorded automation, or anything that involves code commands - just simple visual interface and effortless broadcasting across browsers.
All answers and any help will be highly appreciated!
i have observed a strange behaviour in windows10 during an active application:
While my application is running, it continuously displays a certain pattern (similar to a screensaver).
Now some weird behaviour occurs sometimes:
It should show the pattern on monitor2, but sometimes, after a while, the monitors are switching and the pattern is shown on monitor1 (and stay there). This happens kinda randomly and i don't really know the underlying cause of this.
This is why i would like to know if there is some kind of method to make the monitor arrangement "const" for windows, such that the monitors do always have the same indexing, and can only changed by admin rights.
I googled a little bit about this problem and found "PersistentWindows" on github.
(https://github.com/kangyu-california/PersistentWindows).
Is this actually legit, or does someone else know a better way to get this done?
Note: I know this is not exactly coding related, i hope the question is not too much off-topic.
Thanks already in advance! :)
Foreword
Since this appears to be a bug in the d3d9 Emulation on the Windows side, this would probably best addressed to Microsoft. If you know where I could get into contact with the DirectX Team, please tell me.
For the time being, I'm assuming that the only real chance we have is working around the bug.
What
We're investigating an inresponsiveness found in the Game Test Drive Unlimited 2.
Only when opening the Map and only when having an "RTX" Card (I think the most precise we got is GDDR6, because AMD also seems affected).
After long debugging, we found out, that it's not a simple fault of the game, but instead Present returning D3DERR_DEVICELOST even when having the game in Windowed Mode.
When the Game is in Fullscreen Mode, it properly does the required roundtrip over TestCooperativeLevel and Reset, but after the next frame is rendered, Present has lost the device again, causing the Hangup.
Now I'm looking for pointers on how to solve this issue. While it's probably some internal state corruption of some sorts, it's definitely triggered by an API Call only present when rendering the Map in that Game.
We will try to dig into d3d9.dll, but my suspicion is that the error code just comes from some Kernel/Driver Call, where our knowledge and tooling ends.
Ideally I'd like to fuzzy-find the drawcall by just hooking everything and omitting random apicalls, but I guess it's just not so easy and causes a lot more errors in most conditions.
Also note that an APITrace we did, showed D3D_OK for every single call including EndScene, up until Present, so it's not as simple as checking the return codes.
Trying to use Direct X 9 in Debug/Diagnostic Mode is also not really possible on Windows 10 anymore apparently, even when installing the SDK from June 2010
Thanks in Advance for any idea and maybe addresses to direct this problem to.
All I want is to make a simple application that you can resize while rendering.
(IE resize while never once seeing the buffer out the edge of the screen)
Most commercial, professional, and major open source programs seem to be capable of this, while most all personal or hobbyist programs never seem to be capable of this. (I have no idea why)
I want to make a professional looking program like that.
A few examples of what I'm talking about:
https://gamedev.stackexchange.com/questions/127691/how-to-stop-sdl-from-freezing-the-rendering-while-resizing-the-window
https://www.gamedev.net/forums/topic/488074-win32-message-pump-and-opengl---rendering-pauses-while-draggingresizing/
https://en.sfml-dev.org/forums/index.php?topic=19388.5
What I have used in the past for windowing are:
SDL (Currently)
SFML
GLFW +OpenGL
And this problem applies to all 3 from what I can recall.
I would like to know the following:
If this is a problem that is solvable, please tell me why or why not
I've never once looked that low-level (OS APIs nor Graphics back-ends) so I just want to know why.
What's the way to solve this? Is it within my means?
Is the solution -really- a perfect solution? I've seen many people suggest solutions that have various problems
(IE minimizing the buffer but not getting rid of it entirely OR you got rid of it but there's a ton of flickering (I forgot why but it doesn't matter))
My current understanding is that this a Win32 API/Windows API related bug related to blocking.
I don't have any deeper understanding or knowledge on how to create my own solution easily, but if I must learn then I will.
( Hi, everyone. I'm very new to Windows programming, so I apologize in advance if this has already been asked and I just didn't know what to search for, but this problem has been driving me crazy and I know someone could probably answer this really easily. )
My company has an application that runs as a service in Windows 7. I have been tasked with writing code to change display settings, but I apparently cannot do this from a system service. I created a small executable that changes the color depth to 8bpp in about 5-10 lines of code, but when I place this code in my application, it returns success yet does not actually succeed (nothing changes).
Without a commanding knowledge of how Windows programming works, I have managed to try a MILLION different things to get it to work but with no avail. Can somebody PLEASE help me find what I need to do to make this code function?
On Vista and upwards services run in a different session (session 0) and are isolated from the interactive desktop(s). This means that code that you run from the service is simply unable to make the changes you want. The obvious conclusion is that you need to run code in the interactive desktop.
Now you can do this, but it's not exactly easy to achieve. What you will need to do is arrange for your service to launch an process that runs on the interactive desktop: Launching an interactive process from Windows Service in Windows Vista and later. That process, rather than the service, is what will have to make the changes.
Whilst it is possible to achieve what you want, I think you should regard the difficulties involved as a signal to review whether or not your proposed approach is the best solution to whatever your underlying problem is.