DIMM_V2 Posted November 10, 2023 Share Posted November 10, 2023 Hello , can someone please help me with my code , im trying to click on "Setup" text but this is on Frame , so i dont know how to do that , thank you my not working code : #include <Array.au3> Run("C:\Program Files\ESET\ESET Endpoint Antivirus\egui.exe") Sleep(2000) Global $hWnd = WinGetHandle("egui.exe") Global $hWnd = WinWait('ESET Endpoint Antivirus') If Not $hWnd Then MsgBox(16, "Error", "ESET Endpoint Antivirus window not found") Exit EndIf ControlClick('ESET Endpoint Antivirus','','[TEXT:Tools]') Sleep(1000) ControlClick('ESET Endpoint Antivirus','','[TEXT:Setup]') ControlClick("ESET Endpoint Antivirus","", "") ; Title: ESET Endpoint Antivirus ; Class: ESET Main Frame * For the moment my Solution is : Click on this button by Coordinates Mode , but it is not very reliable, And yes , autoit info tooll , can't detect that. i want to detect this button as text and after click on that . >>>> Window <<<< Title: ESET Endpoint Antivirus Class: ESET Main Frame Position: 392, 130 Size: 1024, 670 Style: 0x94070000 ExStyle: 0x00040100 Handle: 0x00000000001B0BC2 is that possible ? thx Link to comment Share on other sites More sharing options...
Developers Jos Posted November 10, 2023 Developers Share Posted November 10, 2023 Moved to the appropriate AutoIt General Help and Support forum, as the Developer General Discussion forum very clearly states: Quote General development and scripting discussions. Do not create AutoIt-related topics here, use the AutoIt General Help and Support or AutoIt Technical Discussion forums. Moderation Team SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Nine Posted November 10, 2023 Share Posted November 10, 2023 Most likely, you cannot automate Anti-Virus software. Otherwise it would make it very vulnerable... DIMM_V2 1 “They did not know it was impossible, so they did it” ― Mark Twain Spoiler Block all input without UAC Save/Retrieve Images to/from Text Monitor Management (VCP commands) Tool to search in text (au3) files Date Range Picker Virtual Desktop Manager Sudoku Game 2020 Overlapped Named Pipe IPC HotString 2.0 - Hot keys with string x64 Bitwise Operations Multi-keyboards HotKeySet Recursive Array Display Fast and simple WCD IPC Multiple Folders Selector Printer Manager GIF Animation (cached) Screen Scraping Multi-Threading Made Easy Link to comment Share on other sites More sharing options...
DIMM_V2 Posted November 11, 2023 Author Share Posted November 11, 2023 11 hours ago, Nine said: Most likely, you cannot automate Anti-Virus software. Otherwise it would make it very vulnerable... I have already done it with python.and autoit + images. Link to comment Share on other sites More sharing options...
Solution DIMM_V2 Posted November 11, 2023 Author Solution Share Posted November 11, 2023 (edited) ok ,Got , It , full working code . This Clicks on: Tools , Setup, and highlight Advanced Setup. expandcollapse popup#include "UIAWrappers.au3" ;~ dimm ;~ find UIA controls with simplespy.au3 ; Start ESET Endpoint Antivirus Run("C:\Program Files\ESET\ESET Endpoint Antivirus\egui.exe") WinWait("ESET Endpoint Antivirus") ; Get ESET window object $oEset = _UIA_getFirstObjectOfElement($UIA_oDesktop, "class:=ESET Main Frame", $treescope_children) $oEset.setfocus() ;~ ToolTip("Eset") Sleep(1000) ; Click on 'Tools' (Assuming it is a button or a clickable element) $oToolsButton = _UIA_getObjectByFindAll($oEset, "controltype:=UIA_ButtonControlTypeId;name:=Tools", $treescope_subtree) _UIA_action($oToolsButton, "leftclick") $Setup_button = _UIA_getObjectByFindAll($oEset, "controltype:=UIA_ButtonControlTypeId;name:=Setup", $treescope_subtree) ;~ Sleep(1000) _UIA_Action($Setup_button,"highlight") ;~ Sleep(2000) _UIA_action($Setup_button, "leftclick") ;~ Sleep(1000) ;~ $test = _UIA_getObjectByFindAll($oEset, "controltype:=UIA_MenuControlType;name:=Advanced Setup", $treescope_subtree) $test = _UIA_getObjectByFindAll($oEset, "controltype:=UIA_PaneControlTypeId,50033;name:=Advanced Setup;", $treescope_subtree); dimm keep 50033 of instance of object , or add <> for UIA_PaneControlTypeId ;~ WinActivate("ESET Endpoint Antivirus") Sleep(2000) _UIA_Action($test,"highlight") ;~ highlight my test s ;~ _UIA_action($test, "leftclick") ;~ _UIA_action($oPaneControl, "leftclick") ;~ UIA_MenuItemControlTypeId (4): ;~ Represents a menu item control. ;~ UIA_PaneControlTypeId (18): ;~ Represents a pane control. ;~ UIA_SliderControlTypeId (12): ;~ Represents a slider control. ;~ UIA_SpinnerControlTypeId (14): ;~ Represents a spinner control. ;~ UIA_TabControlTypeId (8): ;~ Represents a tab control. ;~ UIA_TextControlTypeId (21): ;~ Represents a text control. ;~ UIA_ToolBarControlTypeId (6): ;~ Represents a toolbar control. ;~ UIA_TreeControlTypeId (10): ;~ Represents a tree control. ;~ UIA_WindowControlTypeId (9): Edited November 11, 2023 by DIMM_V2 Link to comment Share on other sites More sharing options...
DIMM_V2 Posted November 22, 2023 Author Share Posted November 22, 2023 (edited) Hello , im back :;-) i wonder if it possible to automate a custom software build like this one : * at my knowledge of today , it is possible with two methods : 1- image click with autoit , 2 - exact mouse coords , there is a 3 tr method to do this ? as info i have only class , no info , no text even with simplespy,Control Viewer (mod 2023) * if someone want to test with soft from the picture i have attached this exe. log from simple spy : Mouse position is retrieved 312-498 At least we have an element [Index][TfrmMain.UnicodeClass] Having the following values for all properties: Title is: <Index> Class := <TfrmMain.UnicodeClass> controltype:= <UIA_WindowControlTypeId> ,<50032> , (0000C370) 154;130;606;468 *** Parent Information top down *** 0: Title is: <Desktop 1> Class := <#32769> controltype:= <UIA_PaneControlTypeId> ,<50033> , (0000C371) 0;0;1768;992 "Title:=Desktop 1;controltype:=UIA_PaneControlTypeId;class:=#32769" ;~ *** Standard code *** #include "UIAWrappers.au3" AutoItSetOption("MustDeclareVars", 1) _UIA_setVar("Index.mainwindow","title:=Index;classname:=TfrmMain.UnicodeClass") _UIA_action("Index.mainwindow","setfocus") dimm_gui.rar Edited November 22, 2023 by DIMM_V2 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