<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Retrieve SAPGUI events with comtypes in Python in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-sapgui-events-with-comtypes-in-python/m-p/12463147#M2000356</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I've been trying to get notified by events in SAP in python. For this I wanted to the comtypes module (I cannot use the win32com module). I can retreive the scripting engine of SAP as follows:&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;import comtypes.client&lt;/P&gt;
  &lt;P&gt;SapGui = comtypes.client.CoGetObject("SAPGUI").getScriptingEngine&lt;/P&gt;
  &lt;P&gt;Now I should be able to use comtypes.client.ShowEvents as follows:&lt;/P&gt;
  &lt;P&gt;comtypes.client.ShowEvents(SapGui)&lt;/P&gt;
  &lt;P&gt;Which would print out all events of the SapGui. However, I get the following error: "TypeError: cannot determine the source interface", which I am not sure on how to solve. How can I apply ShowEvents (or something similair) while still using comtypes?&lt;/P&gt;
  &lt;P&gt;Kind regards,&lt;/P&gt;
  &lt;P&gt;Falko&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 12:47:28 GMT</pubDate>
    <dc:creator>former_member741893</dc:creator>
    <dc:date>2021-04-20T12:47:28Z</dc:date>
    <item>
      <title>Retrieve SAPGUI events with comtypes in Python</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-sapgui-events-with-comtypes-in-python/m-p/12463147#M2000356</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
  &lt;P&gt;I've been trying to get notified by events in SAP in python. For this I wanted to the comtypes module (I cannot use the win32com module). I can retreive the scripting engine of SAP as follows:&lt;/P&gt;
  &lt;P&gt;&lt;BR /&gt;import comtypes.client&lt;/P&gt;
  &lt;P&gt;SapGui = comtypes.client.CoGetObject("SAPGUI").getScriptingEngine&lt;/P&gt;
  &lt;P&gt;Now I should be able to use comtypes.client.ShowEvents as follows:&lt;/P&gt;
  &lt;P&gt;comtypes.client.ShowEvents(SapGui)&lt;/P&gt;
  &lt;P&gt;Which would print out all events of the SapGui. However, I get the following error: "TypeError: cannot determine the source interface", which I am not sure on how to solve. How can I apply ShowEvents (or something similair) while still using comtypes?&lt;/P&gt;
  &lt;P&gt;Kind regards,&lt;/P&gt;
  &lt;P&gt;Falko&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 12:47:28 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-sapgui-events-with-comtypes-in-python/m-p/12463147#M2000356</guid>
      <dc:creator>former_member741893</dc:creator>
      <dc:date>2021-04-20T12:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Retrieve SAPGUI events with comtypes in Python</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-sapgui-events-with-comtypes-in-python/m-p/12463148#M2000357</link>
      <description>&lt;P&gt;Hi and welcome to
the SAP Community!&lt;/P&gt;&lt;P&gt;Thank
you for visiting SAP Community to get answers to your questions. Since you're
asking a question here for the first time, I recommend that you familiarize
yourself with &lt;A href="https://community.sap.com/resources/questions-and-answers"&gt;https://community.sap.com/resources/questions-and-answers&lt;/A&gt;
(if you haven't already), as it provides tips for preparing questions that draw
responses from our members. &lt;/P&gt;&lt;P&gt;Should
you wish, you can revise your question by selecting Actions, then Edit
(although once someone answers your question, you'll lose the ability to edit
the question -- but if that happens, you can leave more details in a comment).&lt;/P&gt;&lt;P&gt;Finally,
if you're hoping to connect with readers, please consider adding a picture to
your profile. Here's how you do it: &lt;A href="https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS"&gt;https://www.youtube.com/watch?v=F5JdUbyjfMA&amp;amp;list=PLpQebylHrdh5s3gwy-h6RtymfDpoz3vDS&lt;/A&gt;.
By personalizing your profile with a photo of you, you encourage readers to
respond.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Julia&lt;BR /&gt;
SAP Community Moderator&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 12:47:35 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/retrieve-sapgui-events-with-comtypes-in-python/m-p/12463148#M2000357</guid>
      <dc:creator>former_member30</dc:creator>
      <dc:date>2021-04-20T12:47:35Z</dc:date>
    </item>
  </channel>
</rss>

