Questions tagged [pythoncom]

PythonCOM is a module, encapsulating the OLE automation API.

PythonCOM is a module, encapsulating the OLE automation API.

http://timgolden.me.uk/pywin32-docs/html/com/win32com/HTML/PythonCOM.html

108 questions
0
votes
0 answers

Import pythoncom error

I am using python version 3.6.1 and my operating system is Windows 10 My code is not working and I am getting the following error: Traceback (most recent call last): File "", line 1, in import pythoncom File…
Ziad Ahmed
  • 74
  • 7
0
votes
1 answer

Tkinter window won't get focus because of pyHook mouse LeftDown function

so I'm trying to open a tkinter window through sensing left clicks from the mouse using pyHook, and I want the newly opened window to get the focus. The problem is that no matter what focus method I try, the current window will always retain the…
0
votes
1 answer

Query interface in python COM server

I am currently starting with win32com package. I have XSL file where I am using COM object programmed in Python: XSL transformation is done using MSXML2 XSL processor and python COM object is injected…
Patrik Polakovic
  • 542
  • 1
  • 8
  • 20
0
votes
1 answer

Pyhook gives me weird outputs for some reason

So I'm new to Pyhook and wanted to make myself a keylogger for educational purposes. However, the log gives me weird inputs. It's either just random symbols, always in capital or all good and normal. I'm using python 3.4 and I'm on Windows. This is…
Lojas
  • 195
  • 3
  • 13
0
votes
0 answers

Code against Pywin32 on OS X?

I'm working on some code that is intended to run on a Windows machine and I would like to take advantage of Windows specific modules such as Pywin32 or Pythoncom. However, I currently use OS X as my main development platform and can't merely pip…
Dave
  • 97
  • 1
  • 8
0
votes
1 answer

win32com.client.DispatchWithEvents for multiple objects in the same thread

I am trying to listen for the OnItemAdd event in 2 separate inboxes at the same time with the following code: class Handler_Class(): def OnItemAdd(self, mail): #Check if the item is of the MailItem type if…
Vlad
  • 55
  • 1
  • 14
0
votes
1 answer

Instantiate COM object that doesn't have ProgID by class/interface name

pywin32 docs for client-side COM show this basic way to instantiate COM objects: obj = win32com.client.Dispatch("") I'm trying to work with PersistentZoneIdentifier akin to Manipulating the zone identifier to specify where a file was…
ivan_pozdeev
  • 33,874
  • 19
  • 107
  • 152
0
votes
1 answer

Return Events from DispatchWithEvents using third party COM

My code prints out what I need from the print statement in Events. But, I have no idea how to return the data because of the way the class is instantiated. Further, the print statement only works if pythoncom.PumpWaitingMessages() is included, but…
Josh Usre
  • 674
  • 1
  • 12
  • 35
0
votes
1 answer

Tkinter text entry with pyHook hangs GUI window

I have a Tkinter GUI application that I need to enter text in. I cannot assume that the application will have focus, so I implemented pyHook, keylogger-style. When the GUI window does not have focus, text entry works just fine and the StringVar…
heidi
  • 655
  • 6
  • 20
0
votes
1 answer

why does pythoncom.pumpmessages() stop working?

so I am writing a program that is logging keystrokes and it works great until I click away from the program's box. when i clicked on like cortana a browser and started typing, it logged a few strokes then completely stopped. It also didn't throw…
J leong
  • 285
  • 5
  • 13
0
votes
0 answers

C++ COM client calling Python COM server

I have created a COM server in Python 2.7 (using pythoncom) and would like to call it from C++ code, but I do not know how. The Python COM server: import pythoncom class PyCOMTest: _public_methods_ = ['getNextNum'] _reg_progid_ = "
KilloWatt
  • 93
  • 1
  • 8
0
votes
1 answer

Py2EXE compiled pyhook binary error

I was compiling some python script using pyhook and pythoncom. The build was successfully after notifying that there is missing module named _cpyHook from pyHook.cpyHook. When i start the .exe file it returns this import error. Traceback (most…
Mohan Rex
  • 1,674
  • 2
  • 17
  • 22
0
votes
2 answers

My script does not delete the last char

I've got a very long script so I will sum it up. LOG_TEXT is where all the chars are stored and the data goes there through Key strokes, so every time a user types a key on the keyboard, it goes to LOG_TEXT. Eventually, the LOG_TEXT is saved in…
Mike
  • 37
  • 6
0
votes
0 answers

pywintypes.com_error using mlab

I want to call matlab from python using mlab. When I do the following from mlab.releases import R2012a as matlab I get the following error: Exception AssertionError: AssertionError() in
user3820991
  • 2,310
  • 5
  • 23
  • 32
0
votes
1 answer

Python Keylogger for Google Chrome

I created a simple Keylogger in python, but I want it to run only if Google Chrome is the Foreground Application (I mean only if the user is inside Google Chrome, the keylogger will Hook. If the user leaves the Chrome, the keylogger will stop and so…
ItayGamil
  • 1
  • 3