cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Using Events with SAP GUI Scripting in Python

mme999
Discoverer
439

I'm doing GUI Scripting with Python using the win32com library. As it is described here: 
https://community.sap.com/t5/technology-blogs-by-members/how-to-use-sap-gui-scripting-inside-python-...

Everything works fine, besides from Events. WithEvents throws assertion errors in the win32client, when using the standard/dynamic way to use the library (alternative #1).

I also tried the static way using gencache.EnsureDispatch. In this case I even don't get the standard things running, e.g. print Name, MinorVersion, MajorVersion works. Connections.count doesn't work. (alternative #2)

As a third way, I tried comtypes (like suggested in this - unanswered - question: 
https://community.sap.com/t5/application-development-discussions/retrieve-sapgui-events-with-comtype...)

I also don't get this working (alternative #3).

So the simple question is: is it possible to use events with SAP GUI Scripting in Python at all?
Is there any example code for that?

Thanks & Regards
Michael

Accepted Solutions (0)

Answers (0)