Questions tagged [win32con]

This is a certain module of Python that contains constants related to Win32 programming. It is not part of the Python 2.6 release, but should be part of the download of the pywin32 project, that gives access to most of Microsoft Windows Win32 API. This gives a developer the ability to create and use COM objects, and the Pythonwin environment, in Python programming.

The guide to variables provided in win2com module can be found here: https://www.programcreek.com/python/index/475/win32con

26 questions
0
votes
1 answer

No module named win32con on Python

First i would like to say I found a few posts here regarding my issue however nothing helped so hopefully I still can find a solution Lately I have being working on a small project . Near my office there is a soccer field and each time a game is…
NoamAS
  • 31
  • 5
0
votes
1 answer

python console terminal sholuld stay on top of any window

Would like your opinion and support on an issue i am trying to overcome. This will be the last piece of puzzle for completion of a small project i am building. Its based on OCR. I am reading text from a live screen ( using below python script ) and…
Number13
  • 3
  • 4
0
votes
0 answers

win32con win32gui PyQt5 focus problems

So I found this example and its really cool and I want to do something similar in a app. The problem I have found though is that yes you can embed the window and yes you can click on things but you are not able to type in the window. so for example…
0
votes
1 answer

Python win32gui get current position of the virtual cursor in a window

I know that using win32gui.PostMessage(hwnd, win32con.WM_MOUSEMOVE, wParam, lParam) I can fake mouse movement to an unfocused application, without effecting my real mouse. How can I get my current "fake mouse" position if win32api.GetCursorPos()…
Programer Beginner
  • 1,377
  • 6
  • 21
  • 47
0
votes
1 answer

windows 10 system tray app crashing after several hours of running. What might be the cause?

I really want to add more context but at the moment I'm just lost. When I click the link to show what line it failed on it points to this (' win32gui.PumpMessages() ') I can say it seems to occur after an hour or so of the computer in a standby…
0
votes
1 answer

How to pause a while loop until a certain key is pressed?

I want the clicking to pause when you press xbutton1 and it to continue when I press xbutton2. Here's my code: import win32api import win32con import pyautogui click = True def clicking(): get = win32api.GetKeyState(win32con.VK_LBUTTON) …
Lugli
  • 1
0
votes
0 answers

How can I get windows EventLog with python?

How can get log from this path : Application and service -> microsoft ->windows -> ... like This Eventlog path I wrote this code but it did not work for this path I also get the logtype ... from in eventlog server = 'localhost' # name of the…
Lashgari
  • 41
  • 11
0
votes
1 answer

win32 parts are being blacked out when taking screenshots of vmware

When trying to take a screenshot of vmware machine the inside of it is being blacked out for some reason. blank screen proof Where as I expect to see the following: visible screen proof The code seems to work fine when testing on calculator and few…
Anisimow
  • 26
  • 3
0
votes
2 answers

How to listen for mouse click events on task bar icon for a currently running application in windows using python?

I'm trying to listen for mouse click events on task bar app icons for currently running apps in windows using python. In the example below, I use python to initiate the internet explorer application. After the app initiates, I then use the…
Justin CR
  • 179
  • 11
0
votes
1 answer

Is there a way to file watcher on all hard disk drives?

I have a scrip to detect some files created on Hard disk drive using win32file API with python from win32file import CreateFile, ReadDirectoryChangesW import win32con def Watcher(): ExtensionScan = ['exe', 'dll', 'vbs', 'com', 'jar'] …
-1
votes
1 answer

Python Win32API SendMessage win32con WM_SETTEXT only works once

Simplified and working code below, but only works once then not again until the window is restarted. Is there some sort of finish set text missing or some other limitation? Can't find any results on google, Thanks import win32api import…
1
2