KB505 Posted July 20, 2017 Posted July 20, 2017 Hello, I'm starting a script in AutoIT to automize a task in a software. I need to click a several Controls. I'm just starting to learn AutoIT, and discovered that we can use the Window Info tool (au3info) to identify controls precisely and targetting safely a specific button. However, when I try it, I realize that most of the controls in my toolbar have the same Control Info (No ID, same class, same instance, ...). The only thing that changes is the ControlClicks Coord but I don't think that it's interesting, I don't see the difference with the Mouse Coordinates. Besides, I was aiming to write a stable script that would work even if the button changes a little bit of place for example. Should I use another tool that Window Info tool to detect this Controls ? Is there another way to identify a Control ? Thank you in advance for your help
Neutro Posted July 20, 2017 Posted July 20, 2017 Hi, You need to give us more informations about what you are trying to do: which software? what au3info shows exactly? what's the exact goal of your script? Put some screenshots if possible Identify active network connections and change DNS server - Easily export Windows network settings Clean temporary files from Windows users profiles directories - List Active Directory Groups members Export content of an Outlook mailbox to a PST file - File patch manager - IRC chat connect example Thanks again for your help Water!
junkew Posted July 20, 2017 Posted July 20, 2017 There are many ways a good atart is with faq31 FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
KB505 Posted July 27, 2017 Author Posted July 27, 2017 Sorry for the late reply. Thank you junkew for your answer, i'm gonna study this. @Neutro : For example, on Windows 10, when I try to select the buttom chrome on the toolbar, here is what I have in the control section of Au3Info : Class : MSTaskListWXlass Instance : 1 ClassnameNN : MSTasklistWClass1 Name Advanced Mode : [CLASS : MSTaskListWClass; INSTANCE:1] ID Text Application in execution Position ... Size ... ControlClick Coords ... Style 0x... ExStyle ... Handle 0x... And I get that for any button on the toolbar (World, Outlook, ...). That's why it seems unefficient to me, am I wrong ? Is there an info here that could allow me to use ControlClick to select the Chrome button ? By the way, I know that I could do that with a simple Run. It is just for the exemple. I just discovered Control Viewer, I think I'm gonna try it. Maybe it will be easier to use than Au3Info.
junkew Posted July 27, 2017 Posted July 27, 2017 Toolbars you can highlight elements with simplespy and that way you get the ids you need to click. Not sure if controlviewer will give you that. As said see faq 38 for details on other tools then au3inf. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets
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