Note that there are some explanatory texts on larger screens.

plurals
  1. POPython ActiveX automation
    text
    copied!<p>I am trying to use ActiveX automation with python to control Audio Precision ATS-2. I am using pywin32 32-bit Windows XP with Python 2.7. </p> <p>I installed the audio Precision software. Then I used <em>makepy</em> utility which found Audio Precision in the list and created a wrapper for it. Everything is going well until I attempt to call dispatch function abd I am stuck. </p> <p>from guides I found online,</p> <pre><code>win32com.client.Dispatch("Excel.Application") </code></pre> <p>What should I put in the area that says "Excel.Application"?</p> <p>How can I find this? </p> <p>When I used OLE/COM Object viewer, I see Audio Precision entries under type library, but I am unsure how does the information in it could help me.</p> <p>I have attempted few things on my own, but got almost no result. The best result I got was when I entered the <code>CLSID</code> in dispatch function, which I found in the wrapper object makepy created.</p> <pre><code>win32com.client.Dispatch("{80EC6E76-D94F-48EB-8F4C-05BDD7850BF1}") </code></pre> <p>which gave me the following error:</p> <pre><code> Traceback (most recent call last): File "C:\Python27\Lib\site-packages\win32com\gen_py\APtest.py", line 5, in &lt;module&gt; xlApp = win32com.client.Dispatch("{80EC6E76-D94F-48EB-8F4C-05BDD7850BF1}") File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx) File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 108, in _GetGoodDispatchAndUserName return (_GetGoodDispatch(IDispatch, clsctx), userName) File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 85, in _GetGoodDispatch IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch) com_error: (-2147221164, 'Class not registered', None, None) </code></pre> <p>I have:</p> <ul> <li>looked under the registry, and the ID is indeed not registered anywhere. There are few Audio Precision entries, but doesn't look like it has anything that could fix this.</li> <li>attempted reinstalling the Audio Precision software, but it didn't help.</li> <li>attempted to register the dll objects in the Audio Precision control(ATS 1.60) software with <code>regsrv32</code>, but all gave errors and would not register(which I suspect aren't the right ones I need to register)</li> </ul> <p>How can I fix this?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload