Sandhya Posted July 21, 2015 Share Posted July 21, 2015 To activate the window and select the required checkbox (Ethernet), I used the below lines of code.Is this correct? It is not working fine.WinWaitActive ("Select the host interfaces you want to search ...", "[CLASS: Button]")ControlCommand ("Select the host interfaces you want to search ...", "", "[TEXT: Ethernet]", "Check", "") Link to comment Share on other sites More sharing options...
Danyfirex Posted July 21, 2015 Share Posted July 21, 2015 winwaitactive Pauses execution of the script until the requested window is active. (it does not activate the window). to activate the window (focus) use WinActivate.in controlcommand use CLASS instead TEXTSaludos 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...
Sandhya Posted July 23, 2015 Author Share Posted July 23, 2015 when I am opening that window, the button id is changing each time. So I need to search for text and enable it. Link to comment Share on other sites More sharing options...
noobieautolearn Posted July 23, 2015 Share Posted July 23, 2015 (edited) You could use Opt("WinTitleMatchMode", 2) before the command and then use WinWaitActive ("Select the host interfaces you want to search") if "Select the host interfaces you want to search" stays the same all the time it will recognize the window and then use controlclick with the x/y coordinates for that specific window where you want it to fill in the checkbox or then use your second command and see if it works now that autoit sees the window. Edited July 23, 2015 by noobieautolearn Link to comment Share on other sites More sharing options...
Sandhya Posted July 23, 2015 Author Share Posted July 23, 2015 It is not working.the window title and buttons present inside the window are same. Only the button number for each checkbox are varying each time. 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