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
1
vote
1 answer

Need help to resolve issue with Anaconda Python 2.7 x32

I've installed Anakonda Python 2.7 x32 package and now can't use native pythoncom-library. Full list of installed 3rd party libraries: PySide ftputil ruamel.yaml/PyYAML PyPDF simplejson PyInstaller sqlparse Padding wmi Error details here: File…
SpanishBoy
  • 2,105
  • 6
  • 28
  • 51
1
vote
0 answers

Why my little keylogger is not sending some of the emails?

I've wrote a simple keylogger that sends an email every 500 keys pressed. And its working. But It's not reliable, sometimes the email is sent, but sometimes not. Lets say, I press a key 1500 times, this should be 3 mails with 500 keys logged. But I…
Jeflopo
  • 2,192
  • 4
  • 34
  • 46
1
vote
0 answers

Using Documents.Open Method to pass in a password. Is this correct?

I have the following lines of code in a .py script and I am accessing a password protected document. However, when this script runs Word asks for the password again from the user once winword.exe is visible. Is this normal behavior? I am doubtful…
user262716
  • 17
  • 1
1
vote
1 answer

pythoncom.Pumpmessages in python

I'm writing little keylogger in python. Here is my code. LOG_FILENAME = 'keylog.txt' def OnKeyboardEvent(event): logging.basicConfig(filename=LOG_FILENAME, level=logging.DEBUG, …
user1870343
1
vote
0 answers

Python COM Server: Accessing Singleton

I need to access the data of one single object from different python processes via COM. In a similar question here on stackoverflow, it was suggested to let the client create multiple COM objects, but let those communicate with a single object…
Springsteen
  • 95
  • 1
  • 8
1
vote
0 answers

Python automation - pythoncom.CoInitialize does not work

I am automating PowerPoint. Everything used to work, but now if I instantiate PPT in one thread I cannot get its name and slidecount in another thread, even after calling pythoncom.CoInitialize(). Thread 1: pythoncom.CoInitialize() self.pptApp =…
Radu
  • 2,076
  • 2
  • 20
  • 40
1
vote
1 answer

Call method from PyIDispatch

I have to get event from COM API which has description: HRESULT OnStatusMessage( [in] IDispatch* pStatusMessage ); And IStatusMessage has properties: BSTR Description, LONG Code, etc. My code doesn't work: import msvcrt import pythoncom from…
DenisKolodin
  • 13,501
  • 3
  • 62
  • 65
0
votes
1 answer

Pythoncom error IDLE (PumpMessage)

Trying to run this script: import pythoncom, pyHook def OnMouseEvent(event): # called when mouse events are received print 'MessageName:',event.MessageName print 'Message:',event.Message print 'Time:',event.Time print…
Stanyko
  • 95
  • 3
  • 15
0
votes
1 answer

Using Autodesk Inventor COM object through Python with PyInstaller

Hello everyone and happy fourth to my friends in America. I am working on a python script which is meant to create an instance of Inventor, and open an assembly file through the COM object. I am aware that using Python with the Inventor API is not…
0
votes
0 answers

com_error: When converting docx to pdf in python

I am currently trying to convert some word documents to PDF using python, some of the files converted successfully with the code I have while I got the following error messages on other files: Error 1: some files reported com_error: (-2147352567,…
tee
  • 11
  • 1
0
votes
0 answers

How to read multiple sigValues from CAN using Python COM API?

I have followed this tutorial to open and start a measurement in CANoe using python COM: https://simulation4vehicle.blogspot.com/2018/09/python-3-canoe-via-com-api.html. This works fine to read one signal value from CANoe using get_SigVal function.…
0
votes
0 answers

win32com.client throwing error while trying to convert pdf to docx

import win32com.client word = win32com.client.Dispatch("Word.Application") word.visible = 1 pdfdoc = 'NewDoc.pdf' todocx = 'NewDoc.docx' wb1 = word.Documents.Open(pdfdoc) wb1.SaveAs(todocx, FileFormat=16) # file format…
0
votes
2 answers

The correct way to create a new instance using pythoncom and force early binding

Spent a little too much time trying to figure it out by myself... I'm working with a FEA app called Simcenter Femap. In my program I need to create N new instances of it after I get some data from base instance for some asyncio fun. Can't even start…
user19796892
0
votes
0 answers

What is the right way to wrap non-python objects so methods have text comprehension?

I have an application (Solidworks in my case, link is to the com_obj documentation for reference) that has an api. I can access and use the the object by: import pythoncom import win32com.client from win32com.client import VARIANT com_obj =…
Garret45
  • 11
  • 2
0
votes
1 answer

TAPI ITAddressDeviceSpecificEven how to get all data from an event?

I am working with a TAPI DLL in Python trying to keep track of all the events that happen. Faced a problem handling ITAddressDeviceSpecificEvent event