maxix Posted April 1, 2023 Share Posted April 1, 2023 Hi, I am trying to automatically click some message boxes that Adobe Animate displays when I open some of my files. For example, when I try to open certain images that are not supported, an error message will be displayed (see 1.png). Using Au3Info_x64.exe, I get 2.png and 3.png. Usually, I have used something like ("[Class:#32770]", "Button1") through PyAutoIt to click a button in a message box, but in this case, that won't trigger. I tried to substitute it with things like ("[Class:DroverLord - Window Class]", "Button1") or ("[ClassnameNN:DroverLord - Window Class1]", "Button1") and similar, but none of them would work. I don't want to work with x/y coordinates, as the resolution and position might not always be the same. Has someone faced this issue before and can provide a solution to my problem? Thank you, Maxix Link to comment Share on other sites More sharing options...
Danyfirex Posted April 2, 2023 Share Posted April 2, 2023 Hello, two options. 1.- Use UIAutomation. 2.- Ge window position use pixelsearch to find the blue color and send a click with controlclick or mouseclick. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
maxix Posted April 2, 2023 Author Share Posted April 2, 2023 Thank you for the suggestions. The second approach seems challenging, as there are other message boxes that I have encountered, and looking just based on the color might not always result in the intended action. I wasn't aware of UIAutomation - I assume you mean https://learn.microsoft.com/en-us/dotnet/framework/ui-automation/ui-automation-overview? It looks interesting. Somewhat unfortunate that it doesn't seem to be easily solvable using AutoIt. Link to comment Share on other sites More sharing options...
LarsJ Posted April 2, 2023 Share Posted April 2, 2023 I'm pretty sure Danyfirex means the Win32 (collective term for x86 and x64 code) implementation of the UI Automation code. It's already implemented in AutoIt. Danyfirex 1 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...
Danyfirex Posted April 2, 2023 Share Posted April 2, 2023 @maxix check @LarsJ's signature. UI Automation link, that's what I meant. Saludos Danysys.com AutoIt... UDFs: VirusTotal API 2.0 UDF - libZPlay UDF - Apps: Guitar Tab Tester - VirusTotal Hash Checker Examples: Text-to-Speech ISpVoice Interface - Get installed applications - Enable/Disable Network connection PrintHookProc - WINTRUST - Mute Microphone Level - Get Connected NetWorks - Create NetWork Connection ShortCut Link to comment Share on other sites More sharing options...
maxix Posted April 2, 2023 Author Share Posted April 2, 2023 Thank you for the clarification. I'll review and see if I can derive something from it for my problem. 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