winapi

Python Invalid arguments using ctypes when calling SetProcessInformation

Python Invalid arguments using ctypes when calling SetProcessInformation Question: I’m trying to set a process in Eco QOS mode (windows specific, allows power saving for a process, see here) with the SetProcessInformation windows API function. My final goal will be to enable the eco QOS for all the process I launch with subprocess.popen() function that …

Total answers: 1

How do you access the "remembered" location of a Windows network drive via Python?

How do you access the "remembered" location of a Windows network drive via Python? Question: I’m using the pywin32 Windows API library to pull information about network drives using the win32wnet.WNetGetConnection() function. When I perform this function on network drives Windows reports as "Unavailable" (Status), the function returns a win32wnet.error stating "The device is not …

Total answers: 1

SendMessage doesn't work for some applications

Why does SendMessage not work for some applications Question: Background: I was trying to program an auto clicker to click in the background to an application (Roblox, not trying to do anything malicious). I was able to get the window and perform commands like closing it. However, when trying to send clicks to the window …

Total answers: 1

CreateProcess: space in a python command passed with -c

CreateProcess: space in a python command passed with -c Question: I am trying to port muon (a C99 implementation of meson) to Windows, and i have some problem with one of its unit tests. This unit test calls python3 with an array of C string, this array being: "-c" "print("some output")" Note that this array …

Total answers: 2

How to change the mouse movement speed with win32api (mouseeventf_move)

How to change the mouse movement speed with win32api (mouseeventf_move) Question: So I basically have a python script set up that moves the mouse in a game to specific x and y coordinates, my question now is how can I make it so the mouse is moving slower, yet still smooth from point a to …

Total answers: 1

API custom voice downloading via Python

API custom voice downloading via Python Question: Is there any way I can download an mp3 file using Python because as soon I get to this URL it automatically opens "file save dialog box" and I’m not able to download it using either the python requests module or PycURL programmatically? I’m getting this URL by …

Total answers: 1

Interrupt (NOT prevent from starting) screensaver

Interrupt (NOT prevent from starting) screensaver Question: I am trying to programmatically interrupt the screensaver by moving the cursor like this: win32api.SetCursorPos((random.choice(range(100)),random.choice(range(100)))) And it fails with the message: pywintypes.error: (0, ‘SetCursorPos’, ‘No error message is available’) This error only occurs if the screensaver is actively running. The reason for this request is that the computer …

Total answers: 3

How to access thumbnail toolbar buttons?

How to access thumbnail toolbar buttons? Question: I’m trying to make some controls with apps (for example Discord or any app that has thumbnail toolbar buttons). I’ve already tried to google, search or just look at the docs. Is there any possible way to do that in python? Screenshot of what I want to control: …

Total answers: 1