Skip to content

Tag: winapi

Interrupt (NOT prevent from starting) screensaver

I am trying to programmatically interrupt the screensaver by moving the cursor like this: And it fails with the message: This error only occurs if the screensaver is actively running. The reason for this request is that the computer is ONLY used for inputting data through a bluetooth device (via a Python prog…

python win32 COM closing excel workbook

I open several different workbooks (excel xlsx format) in COM, and mess with them. As the program progresses I wish to close one specific workbook but keep the rest open. How do I close ONE workbook? (instead of the entire excel application) Answer The the Workbook COM object has a Close() method. Basically, …