擅长:python、mysql、java
<p>AutoIt完全可以做你提到的一切。当我想做一些自动化但是使用Python的特性时,我发现使用<a href="http://www.google.com/url?sa=t&source=web&ct=res&cd=1&url=http%3A%2F%2Fwww.autoitscript.com%2Fautoit3%2Fdownloads.shtml&ei=Yk9TSsOsDYnWNfza6fQI&usg=AFQjCNEBCnVe6pRuxIzX_UE4U_3O8SVYOg&sig2=t4kpjNbgspeikHz2SBkIGg" rel="nofollow noreferrer">AutoItX</a>是一个DLL/COM控件最简单。在</p>
<p>取自我的<a href="https://stackoverflow.com/questions/151846/get-other-running-processes-window-sizes-in-python/155587#155587">this answer</a>:</p>
<pre><code>import win32com.client
oAutoItX = win32com.client.Dispatch( "AutoItX3.Control" )
oAutoItX.Opt("WinTitleMatchMode", 2) #Match text anywhere in a window title
width = oAutoItX.WinGetClientSizeWidth("Firefox")
height = oAutoItX.WinGetClientSizeHeight("Firefox")
print width, height
</code></pre>