Hi all,<div><br></div><div>I am having some trouble with controlling a Windows application through dde</div><div><br></div><div>The application in question is Ecotect: <a href="http://usa.autodesk.com/adsk/servlet/index?id=12602821&amp;siteID=123112">http://usa.autodesk.com/adsk/servlet/index?id=12602821&amp;siteID=123112</a> . This app provides a dde interface for scripting. The application comes bundled with Lua, and this works fine. However, for various reasons, I need to use Python, so I have been trying to get Python talking to Ecotect using Marc Hammonds very nice win32 tools.</div>
<div><br></div><div>This seemed to work well, like this:</div><div><br></div><div><div>import win32ui</div><div>import dde</div><div>server = dde.CreateServer()</div><div>server.Create(&quot;TestClient&quot;)</div><div>conversation = dde.CreateConversation(server)</div>
<div>conversation.ConnectTo(&quot;Ecotect&quot;, &quot;request&quot;)</div><div>conversation.Exec(&quot;model.new&quot;)</div></div><div> </div><div>This opens up a new file in Ecotect. However, as I started to try some more commands, I found that many of the dde command strings described in the documentation are working with Lua, but not with Python / Win32. In particular, the ones that are not working seem to be the ones that return a value. For example:</div>
<div><br></div><div>conversation.Exec(&quot;get.app.computer&quot;)</div><div><br></div><div>returns an error message:</div><div><br></div><div><div>Traceback (most recent call last):</div><div>  File &quot;D:\Documents\Eclipse\z_test_ecotect\test1.py&quot;, line 11, in &lt;module&gt;</div>
<div>    conversation.Exec(&quot;get.app.computer&quot;)</div><div>error: Exec failed</div></div><div><br></div><div>Any thoughts on how I might discover what is going wrong? </div><div>Does anyone know how I might be able to see the dde command strings that Lua is sending to Ecotect (which all seem to work - I am thinking that there may be an error in the documentation).</div>
<div><br clear="all">Regards
</div><div>Patrick</div>