Shaarad Posted May 21, 2012 Share Posted May 21, 2012 Hello everyone, I wanted to automate Microsoft Paint a little bit in my program. But, the problem is, each time I open a new Paint window, the 'Class' and the 'ClassNN' attributes of the paintable area change. Is there any attribute which remains same each time and that control can be uniquely identified? I need to retrieve its position and size using 'ControlGetSize' etc... Any ideas are welcome...thanks again! Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
searchresult Posted May 22, 2012 Share Posted May 22, 2012 Hey I tested this out and it worked every time. WinXP $handle = WinGetHandle("[CLASS:MSPaintApp]") If @error Then MsgBox(4096, "Error", "Could not find the correct window") Else ;Class of the "canvas" is CLASS:Afx:1000000:8 ControlClick($handle, "", "[CLASS:Afx:1000000:8]") EndIf Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now