Elyonne Posted December 9, 2015 Share Posted December 9, 2015 (edited) I'm using AutoIt on an app that I'm running on an Android emulator; my script basically clicks a spot, sleeps, clicks another, etc, etc.Instead of waiting the same fixed number of miliseconds every time and clicking the same predefined position, I'd like for the script to detect when & where the next clickable object pops up on on the emulator window, and either trigger it or pick another response depending on its coordinates.As a side note, I've been rewriting my code and using PixelChecksum(), PixelSearch(), and PixelGetColor() to this end, and it's getting the job done now, but I'd be much happier with something that automatically detects buttons like a screen reader would, if that makes sense. Edited December 11, 2015 by Elyonne Pixel functions work now & also thread was recategorized new to AutoIt and online forums, so I apologize in advance for being annoying. Link to comment Share on other sites More sharing options...
Elyonne Posted December 11, 2015 Author Share Posted December 11, 2015 How do I bump this thread? hehe new to AutoIt and online forums, so I apologize in advance for being annoying. Link to comment Share on other sites More sharing options...
junkew Posted December 12, 2015 Share Posted December 12, 2015 search for tesseract or findbmp.But if you know upfront the area pixelchecksum is the easiest. FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets Link to comment Share on other sites More sharing options...
LarsJ Posted December 13, 2015 Share Posted December 13, 2015 Another method (depending on how advanced you want to do it) is to investigate (with Inspect.exe from Windows SDK) if your objects are recognizable for UI Automation code. If so, you can probably use an UI Automation structure change event handler to monitor structure changes (objects created/deleted) in your window. See these examples.The advantage of this method is that all the hard work is done by the code in uiautomationcore.dll. Your AutoIt script only have to listen for the events. Controls, File Explorer, ROT objects, UI Automation, Windows Message MonitorCompiled code: Accessing AutoIt variables, DotNet.au3 UDF, Using C# and VB codeShell menus: The Context menu, The Favorites menu. Shell related: Control Panel, System Image ListsGraphics related: Rubik's Cube, OpenGL without external libraries, Navigating in an image, Non-rectangular selectionsListView controls: Colors and fonts, Multi-line header, Multi-line items, Checkboxes and icons, Incremental searchListView controls: Virtual ListViews, Editing cells, Data display functions 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